Hacker Newsnew | past | comments | ask | show | jobs | submit | mekazu's commentslogin

Agree that it’s good to get the certainty of zero memory leaks (assuming there’s no associated bugs in apache) but it’s not that hard to write code that doesn’t cause memory leaks for stateful apps as long as you are able to follow certain simple principles and avoid bugs in the third party libs you use.


I wonder if the author knows about `watch`. It seems like it might’ve saved some effort with a better outcome.


This is an great example of how you don’t need fancy graphics for good, playable and engaging games. The music combined with the sound effects works really well too and is very simple.


But they wouldn’t announce it until it’s pretty much ready.


> But they wouldn’t announce it until it’s pretty much ready.

Now you understand sprints


Most good software that I can think of has the luxury of being delivered whenever it’s ready. It’s not estimation that improves the quality of the product but good cost/benefit analysis, although you can get one from the other.


Could use mv -iv for interactive and verbose if you want a rollback or commit alternative.

The real question is: why move files at all?


For the same reason you move stuff in your room. You don't always put it into right places. Or someone else has put it somewhere.


I use Perl similarly to awk if I need to use regex rather than white space delimited fields.

I think if you know Perl really well and can remember the command line arguments - particularly -E, -n, -I and -p - then it’s a good swap in substitute for grep, sed, awk, cut, bash, etc when whatever 5 min task you’re working on gets a tiny bit more complex.

Similarly a decent version perl 5 seems to be installed everywhere by default.

I’m curious to know if anyone would say the same about python or any other programs? I’m not particularly strong in short python scripting.


I would say Perl’s native support for regular expressions makes it more useful on the CLI than Python, but Python is also very low on my preferred languages list.

I do, however, use it for JSON pretty printing in a pipeline: python -mjson.tool IIRC.


> Therefore, this line actually says:

    !didIMakeAMistake() || CIsWrongHere();
> If you understand how short-circuit evaluation works, you can understand that this will result in the following:

   if (!didIMakeAMistake()) 
      CIsWrongHere();
Can someone explain this? I’d have thought that was right without the !


It must be a typo.

Function calls have the highest priority here, followed by logic NOT and logic OR.

    !didIMakeAMistake() || CIsWrongHere();
!didIMakeAMistake() is evaluated first (or you can say didIMakeAMistake() is executed and evaluated first, then its result is inverted and checked), if it's true, evaluation is finished. If it's false, CIsWrongHere(); is evaluated.

It is indeed equivalent to

   if (didIMakeAMistake())  /* !didIMakeAMistake() == false? */
      CIsWrongHere();
Without the invertion.


Thank you guys so much! I've changed it immediately.


Employees are valued by businesses more for their expertise than for their work. I’d rather have one dev who knows how to solve difficult problems than a hundred who don’t. Roughly.


I wonder why pg didn’t launch this article on a Tuesday.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: