News for hackers. Stuff that matters.

cFire

Re:Ask HN: Is my code any good? on Sunday May 03, 2015 @04:20AM (#9480473)
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.
Re:Ask HN: Is my code any good? on Sunday May 03, 2015 @04:15AM (#9480465)
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.)

Re:Ask HN: Is my code any good? on Sunday May 03, 2015 @03:42AM (#9480405)
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.

Re:Ask HN: Is my code any good? on Sunday May 03, 2015 @03:39AM (#9480396)
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.

Re:DSLR – Damn Small Linux Remake on Tuesday September 09, 2014 @04:25PM (#8292796)
There's current mirrors added on the site. The isos from archive.org are outdated.
Re:DSLR – Damn Small Linux Remake on Tuesday September 09, 2014 @02:42PM (#8291885)
http://coolfire.insomnia247.nl/DSLR/ is now entirely up to date with the latest available ISOs.
Re:DSLR – Damn Small Linux Remake on Tuesday September 09, 2014 @02:18PM (#8291727)
Both 64 bit images are up to date now.
Re:DSLR – Damn Small Linux Remake on Tuesday September 09, 2014 @01:34PM (#8291474)
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.
Re:DSLR – Damn Small Linux Remake on Tuesday September 09, 2014 @10:55AM (#8290426)
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.