Skip to content

Instantly share code, notes, and snippets.

View rikukissa's full-sized avatar
🍔

Riku Rouvila rikukissa

🍔
View GitHub Profile
[core]
quotepath = false
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
[color]
ui = true
[color "branch"]
current = yellow black
local = yellow
@rikukissa
rikukissa / repos.md
Last active September 10, 2023 14:12
Should I have my UI and my API in separate repositories?

Should I have my UI and my API in separate repositories?


Keep the number of repositories as small as possible.
You can easily start with just one repository and move some code to another when needed. This is to make your life within the project as easy as possible. As most increments require changes both in the API and the UI, it makes sense to treat them as one


@rikukissa
rikukissa / POST.md
Last active July 21, 2019 20:03
No Code UI
title slug createdAt language preview comments
Rakenna oma mobiilisovellus. Ilman koodia!
no-code-ui
2019-07-18T20:04:29Z
fi
Nettisivun tai mobiilisovelluksen toteuttamiseen ei aina tarvita koodaria.
false

Rakenna oma mobiilisovellus. Ilman koodia!

@rikukissa
rikukissa / POST.md
Last active August 28, 2019 04:49
No Code
title slug createdAt language preview comments
Kiinnostaako No Code? Tule kurssille!
no-code
2019-07-10T10:28:47Z
fi
Vievätkö jatkuvasti toistuvat digitaaliset askareet aikaasi oikealta työltä? Mitä jos pystyisit itse automatisoimaan osan työtehtävistäsi?
false

Kiinnostaako No Code? Tule kurssille!

@rikukissa
rikukissa / POST.md
Last active February 20, 2024 07:30
React Hook prompting the user to "Add to homescreen" 🏠 #PWA #React
title slug createdAt language preview
React Hook prompting the user to "Add to homescreen"
react-hook-prompting-the-user-to-add
2018-11-29T20:35:02Z
en
Simple React Hook for showing the user a custom "Add to homescreen" prompt.

React Hook for showing custom "Add to homescreen" prompt

@rikukissa
rikukissa / LICENCE
Last active November 18, 2018 07:21
Very Cool Uncle Bob SVG
MIT License
Copyright (c) 2018 Riku Rouvila
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE O
@rikukissa
rikukissa / POST.md
Last active July 21, 2019 19:26
On useless try-catches, being overly defensive, I/O boundaries and variable scope #best practices #refactoring #code review
title slug createdAt language preview
On useless try-catches, being overly defensive, I/O boundaries and variable scope
on-useless-try-catches-being-overly-defensive
2018-11-03T10:43:09Z
en
Many things can go wrong when try-catch is used, especially in an asynchronous context. As a structure try-catch is quite powerful and should be used sparingly, only when it's really needed.

On useless try-catches, being overly defensive, I/O boundaries and variable scope

@rikukissa
rikukissa / POST.md
Last active August 10, 2019 07:40
Define value boundaries early, keep things flat #best practices #refactoring #code review
title slug createdAt language preview
Define value boundaries early, keep things flat
define-value-boundaries-early-keep-things-flat
2018-11-01T18:45:46Z
en
This is actually one of my personal favourite refactors. It reduces nesting, gives structure for functions and in many cases provides the answer to readers' question quicker.

Why early returns make your code easier to understand

@rikukissa
rikukissa / README.md
Last active September 19, 2019 07:04
Collection of code simplification and refactoring tips #best practices #refactoring #code review

logo


Collection of code simplification and refactoring tips

Want to write clean code? Well here's your chance. The following set of examples are practices that I've come across during my times as a programmer and that I believe in. At least at the moment. Please feel free to add comments, criticise my thinking and contribute to everyone's knowledge. I'm trying to find a better platform for these, but for now a gist should do. I'm doing this solely to document, analyse and share my own thinking, which oftentimes is quite unstructured. These days I'm not too fussed about the syntactical structures of the code, but would rather concentrate on painting the largest guidelines and deciding the direction I want my programming style to move towards.