Skip to content

Instantly share code, notes, and snippets.

🤷‍♂
Wait, what's this

Riku Rouvila rikukissa

🤷‍♂
Wait, what's this
Block or report user

Report or block rikukissa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rikukissa
rikukissa / POST.md
Last active Jul 21, 2019
No Code UI
View POST.md
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!

View POST.md
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 Nov 25, 2019
React Hook prompting the user to "Add to homescreen" 🏠 #PWA #React
View POST.md
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 Nov 18, 2018
Very Cool Uncle Bob SVG
View LICENCE
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 Jul 21, 2019
On useless try-catches, being overly defensive, I/O boundaries and variable scope #best practices #refactoring #code review
View POST.md
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 Aug 10, 2019
Define value boundaries early, keep things flat #best practices #refactoring #code review
View POST.md
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 Sep 19, 2019
Collection of code simplification and refactoring tips #best practices #refactoring #code review
View README.md

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.

@rikukissa
rikukissa / PrintDict.vba
Created Aug 16, 2018
Dictionary printer for Visual Basic
View PrintDict.vba
Function PrintDict(Dict as Dictionary, Optional ByVal Stack as String = "")
For Each Key In Dict.Keys()
If TypeOf Dict(Key) Is Dictionary Then
Debug.Print Stack & Key & ":"
PrintDict Dict(Key), Stack & " "
Else
Debug.Print Stack & Key & ": " & Dict(Key)
End If
Next
End Function
@rikukissa
rikukissa / flow.json
Last active Feb 11, 2018
Google face detection for Node-RED
View flow.json
[
{
"id": "d6e8fa47.38bfd8",
"type": "http request",
"z": "a2a19eb0.8be53",
"name": "Google Vision",
"method": "POST",
"ret": "obj",
"url":
"https://vision.googleapis.com/v1/images:annotate?key=AIAIAIAIAIAIAXYXYXYXYXYXYXYXYXY",
@rikukissa
rikukissa / _touchbar.png
Last active Dec 26, 2017
Crypto ticker for MacBook Touch Bar
You can’t perform that action at this time.