Live data from Hacker News

Ask HN: Have you created programs for only your personal use?

news.ycombinator.com

521–530 of 671 posts

Re: Ask HN: Have you created programs for only your personal use?

#521

Earlier quoted context omitted.

I think the generator from xkcd sounds pretty good. https://xkcd.com/936/

For ages I remembered this as 'battery-horse-staple-correct' but then I see loads of people saying 'correct-battery-horse-staple' so now I think I'm the one who is wrong. I wonder which way round is actually the right way to say it?

[deleted]

Re: Ask HN: Have you created programs for only your personal use?

#522
post #141

Earlier quoted context omitted.

> Hundreds! Doesn't everyone? I certainly have. Interestingly, one was the same "sanity check" program for my internet connection, because of the same ISP you mention. Amazing coincidence...I don't think. :-)

I've written one too, if you count a simple shell alias for ping google.com Comcast "service" has probably driven the creation of more trivial internet connection test programs than any college course in the world.

Mine uses notify-send to send a notification when connection is back up/ when connection goes down.

Re: Ask HN: Have you created programs for only your personal use?

#523
post #259

Earlier quoted context omitted.

I always find those annoying to copy (we use a lot of shared credentials, like when the customer gives us 3 accounts with different permission levels to pentest an application with) and it also simplifies the command to not have to specify all those symbols. You can also avoid the whole `fold` thing by just telling `head` to give you a certain number of -c instead of a certain number of -n. (Then again, you were prop…

Using head -c 16 will show an ugly '%' at the string end when not piped.

On which OS? There it is piped, but I can't make it display a "%" any way (why would it?). I'm on Linux, using head from GNU coreutils.

Re: Ask HN: Have you created programs for only your personal use?

#525

Huh, I've never been asked that. Yes, for over 30 years. I could never list them all. Nearly every thought I have becomes a program. I've written x86 asm game hacks (DOS era), 2D tile games (80's), Windows MIDI composers, game frame languages, ray-tracing renderers, OpenGL visualization, PID controllers, camera controllers, video controllers, circuit simulators, flight controllers, so so so many games, scripts for an…

I wish I could shift my thinking to do this. I've been a web developer for 17 years and love programming. But any time I've tried to build my own projects or products, it's usually a revamp of an existing product or game, and I quickly lose interest. I lack the ability to see everyday "issues" that could be resolved with programming. But if someone asks me to solve an issue with a program, I could probably come up wi…

If you don't need/want it yourself, and no one's paying you to do it, yes, you'll lose interest. I don't have your problem; I reach for code as a solution pretty quickly. Probably key is I'm not trying to "finish" personal projects or make a product, just doing as much as I need at the time.

Since you know web development, maybe install TamperMonkey and start "fixing" or improving websites you use regularly. You can often make a significant difference to your experience with a few lines of code written in a few minutes (changing/adding CSS rules, making links visible instead of hidden in dropdown menus, reordering/recolouring things, presenting information in a more sensible way, adding shortcut keys, converting static tables to DataTables, etc.). Over time some of my user scripts have grown to many hundreds of lines, and even been adapted to be essential components of workflows of me and my colleagues. They make my job/life easier dozens of times a day.

(Most of these are for internal websites or idiosyncratic to my needs, so there's no point in sharing them.)

Re: Ask HN: Have you created programs for only your personal use?

#526
post #523

Earlier quoted context omitted.

Using head -c 16 will show an ugly '%' at the string end when not piped.

On which OS? There it is piped, but I can't make it display a "%" any way (why would it?). I'm on Linux, using head from GNU coreutils.

Arch Linux. When using Zsh the last char is always a '%'. When using Bash it does no show a '%' but there's no line break. Possibly an weird interaction with my $PS1.

Re: Ask HN: Have you created programs for only your personal use?

#527
post #387

Sure... my most recent one is an app for the sport of Boxing. It's what I tinker on when I'm tired of coding on business software stuff. It's getting to be a pretty cool too. It has a "Scorecard" and database for boxers, and I've taken my first (shallow) dive into "Sports Analytics" to predict a winner of an upcoming bout, and it's working pretty good too.

Fascinated and would love to hear more! Any success so far? If you put out a write up I’d love to read it.

Re: Ask HN: Have you created programs for only your personal use?

#528
post #412

Earlier quoted context omitted.

> This is common among a certain type of person and unheard of for everybody else. I suspect the venn diagram of that is very close to the venn diagram of hn readers and everybody else. I think "doesn't everyone here" is implied there.

Yeah, that's the thing I think you imagine is true but actually isn't. I'd guess that the majority of HN readers don't do this, assuming they represent average technical employee across the industry. They probably _could_ if they needed to.. but I bet they don't. (Just based on my sample of: all the people I've worked with).

> I'd guess that the majority of HN readers don't do this, assuming they represent average technical employee across the industry.

That would be the disagreement then I think: you and him have different models of the majority HN reader. Based on my experience in the industry and on hn, I also don't think the typical hn commenter represents the average technical employee. Perhaps the typical hn reader does, but then I have a lot less information about that group.

I don't think it's right to say he's "out of touch" for an off the hand remark like that, even regardless of this discussion.

e: also, there is a poll option for hn posts, it might be interesting to find out more about who does/doesn't do this.

Re: Ask HN: Have you created programs for only your personal use?

#529
Hmm, I have my own Jira client for desktop. I’m sure I’ll get around to publishing it one day, but for now I get to enjoy it myself.

I just cannot deal with enterprise installations of Jira and their forced insanity/slowness. So now I get to define my own fields, categories and icons, query everything locally, and I never have to worry about it again.

Oh, and if I were using atlassian cloud I wouldn’t have lost all my issues :P

Re: Ask HN: Have you created programs for only your personal use?

#530
post #256

Earlier quoted context omitted.

Please don't use $RANDOM or $((RANDOM)) or standard `shuf` for password generation. These RNGs are not cryptographically secure. Use input from /dev/urandom instead. Modulo operations like these are another thing to avoid. To get equal chances for each word, the simplest thing to do is e.g. do wordlistlength = 10e3 randomnumber = os.urandom(1) * 256 + os.urandom(1) while randomnumber > wordlistlength return wordlist[…

I'm curious. What kind of attacks do you open yourself up to if you use $RANDOM in this situation? Also, why do we avoid modulo operations?

$RANDOM has low entropy, a predictable sequence and it's even more predictable if you use modulus.

$RANDOM provides 15 bits of randomness (32768 possible values) from an LCG[1] - https://en.wikipedia.org/wiki/Linear_congruential_generator

LCGs are multiply followed by add followed by modulus, which is usually implied by a mask or a native word bit length rolling over. You should observe that multiplies have patterns in the lower digits which an add will only offset, and the modulus will only throw away high bits rather than mix them back in to the low bits. Consider the low digit in multiples of 7 (what you'd get picking a number between 0 and 9 inclusive via modulus):

    7 -> 7
   14 -> 4
   21 -> 1
   28 -> 8
   35 -> 5
   42 -> 2
   49 -> 9
   56 -> 6
   63 -> 3
   70 -> 0
   77 -> 7
   84 -> 4
   91 -> 1
   98 -> 8
  105 -> 5
  112 -> 2
  119 -> 9
  126 -> 6
  133 -> 3
  140 -> 0
The lowest digit has the sequence 7418529630 repeating, which isn't very random. Modulus preserves low order bits and throws away the magnitude of the number. The result is that if you want to get half-decent low-valued random numbers from an LCG, you should take x/range * limit rather than %. You can do this with integer arithmetic via multiply and shift if you have an integer twice the size of your LCG.

But again, don't use an LCG for generating your password.

[1] I looked at the source. Bash looks like it tries to use random(3) if it's available, otherwise it seems to use this, which doesn't have an add:

  x(n+1) = 16807 * x(n) mod (m)
Post reply on HN