HNHacker News
TopNewBestAskShowJobs

cFire

-1 karma · joined September 9, 2014

submissionscomments
cFire··on Ask HN: Is my code any good?
It's more a matter of what you consider to be obvious in this case. In my experience, especially regex matching can become very not-so-obvious if you're coming back to code you wrote some time ago. Or if someone else is reading it.
cFire··on Ask HN: Is my code any good?
Valid point. In this case a separate function would be better. It's not always an option though.

Edit: Rather I should say; It's not always an option that makes things better.

If you're writing a comment for a block of code is definitely a good time to think "Should this not be a separate function?" (I clearly need to do this more myself too.)

cFire··on Ask HN: Is my code any good?
To illustrate, here's something I wrote not too long ago: https://gitlab.insomnia247.nl/coolfire/pfsense-ident-proxy/b...

It's a little quick-and dirty but it's the way it's commented that makes the point I'm going for here.

cFire··on Ask HN: Is my code any good?
In my experience it's useful to add a little more documentation/comments to your code. It makes it a lot more readable for anyone else and more importantly, a lot easier for yourself when you're writing updates a while from now.

I like to have a little comment above every function that explains what it does at least. On top of that I usually put a single line above every logical block of code. Something like "Loop trough list of someobject." It seems obvious but it does make it a lot easier to read back code later.

cFire··on DSLR – Damn Small Linux Remake
There's current mirrors added on the site. The isos from archive.org are outdated.
cFire··on DSLR – Damn Small Linux Remake
http://coolfire.insomnia247.nl/DSLR/ is now entirely up to date with the latest available ISOs.
cFire··on DSLR – Damn Small Linux Remake
Both 64 bit images are up to date now.
cFire··on DSLR – Damn Small Linux Remake
Turns out the ones with incorrect md5sums are indeed older builds. All ISOs are being brought up to date as fast as it'll go.
cFire··on DSLR – Damn Small Linux Remake
http://coolfire.insomnia247.nl/DSLR/

The md5sums for 3 of them don't seem to match what's on the DSLR page though. The one with a .md5sum file does match. Use others with caution for now.