5 ms·
Ask HN: How have you been celebrating programmer's day?
- city41 14y agoI took the entire week off and have been using the time to work on my game. My fiancée doesn't understand at all :)
- saurabh 14y agoHad a haircut, shave and head massage.
- mapleoin 14y agoDid some programming.
- csmattryder 14y agoWishing Programmer's Day was a national holiday.
- rey12rey 14y agoAttending lectures as usual
- wattonen 14y agoif (isProgrammersDay) { beer++; }
- gamebit07 14y agoi would prefer { ++beer; }
- wattonen 14y agowhy?
- gamebit07 14y agoPre increment being faster than post increment. Detailed article: http://www.sanity-free.com/145/preincrement_vs_postincrement_operators.html http://www.sanity-free.com/145/preincrement_vs_postincrement...
- nicholassmith 14y agoI like how an off the cuff response to a jokey piece of pseudocode gets decent responses. And people say Hacker News has gone downhill. I like pre-increment due to the speed aspects as well, but it took ages to break out from the university training of "use post-increment for most situations", which is frankly baffling.
- city41 14y agoI've always felt it read better too. I mentally say "increment i" for ++i versus "i increment" for i++.
- spacemanaki 14y agoOk, pardon my ignorance, and I know this is really getting out into the pedantry weeds, but that seems like a slightly bizarre post, at best misleading, at worst even wrong. Why would anyone chose A in that example? Does using pre- and post- increment really result in different behavior for that example in C#? In other words, do these really produce different output: for(int i = 0; i < 5; ++i) { Console.WriteLine(i); } for(int i = 0; i < 5; i++) { Console.WriteLine(i); } Answers to this question on StackOverflow indicate not: http://stackoverflow.com/questions/484462/difference-between-i-and-i-in-a-loop http://stackoverflow.com/questions/484462/difference-between... It seems like the example might have been supposed to be: for(int i = 0; i < 5; ) { Console.WriteLine(i++); } Furthermore, is this even correct: "What is the order of operation? Declare, loop body, compare, increment, loop body, compare, increment, .... " Surely for loops in C# are the same in almost every other language, and the comparison happens once before the body is ever executed? I don't know anything about C#, but I think the suggestion to use one over the other due to performance is pretty poor advice if applied in general. I doubt incrementing an integer is a performance issue in many programs, and if it is you should come to that conclusion after careful profiling. Granted, that post makes the point that based on the C# spec one may be faster than the other, but I still think there are more important things to spend time optimizing.
- randomdata 14y agoThe compiler I am using produces the exact same output for either variation of the aforementioned code. Perhaps it is a good habit to get into if you are jumping between different tools though.
- wattonen 14y agoin this case no matter :)
- deleted 14y ago[deleted]
- hso9791 14y agoin my case ++beer--
- RivieraKid 14y agodon't forget unit tests
- RivieraKid 14y agoThinking about a new technically challenging project, that will help programmers, who are also designers.
- espinchi 14y agoProgramming, Motherfucker
- espinchi 14y agoFor those that don't know about the Programming, Motherfucker Manifesto, here it is: http://programming-motherfucker.com/ http://programming-motherfucker.com/
- RivieraKid 14y agoMy favourite methodology, the only one that is not full of BS (I'm not kidding).
- thdn 14y agoSame here !
- jdpage 14y agoSo far? Sitting through an 8:30am Stat class. Afterwards? Catching up on sleep, then working on my research (by which I mean programming a bunch).
- megamark16 14y agoIt's my birthday, so I'll be celebrating it with cake and ice cream :-)
- pav3l 14y agoHappy birthday!
- sp332 14y agoShipping! :)
- nicholassmith 14y agoI wasn't even aware we had a programmers day, so I've spent my programmers day cleaning up after someone who's getting no jelly and ice cream at this programmers party.
- mbenjaminsmith 14y agoWrote a notification system for Lua. Nothing exactly challenging but something I plan on posting on github to save other programmers ~30 minutes.
- flaie 14y agoI forwarded this to my boss. Waiting for approval.
- Fletch137 14y agoTaking the rest of the week off, going on holiday to the Netherlands and working on some long-standing items on my programming to do list.
- ajhai 14y agoTrying to build a web crawler :-)
- gavinlynch 14y agoWhat I do every other time I'm "programming": Perusing Hacker News... :p
- el_cuadrado 14y agoThey they programmers actually spend their time: bugfixing.
- cgil 14y agoI'll be at PennApps in a 48 hour hackathon. I encourage everyone else to get out there and fix the world, one segfault at a time.
- msg 14y agoAw, usually programmer's day is my birthday, but it's a leap year. I'm turning 100000 tomorrow.
- Achshar 14y agoBrowsing HN and Reddit and writing some code and teaching a friend how to code. Plus waiting for iPhone announcement.
- sebslomski 14y agoYou mean except the Brazilian dancers? Man, these lap dances can be pretty disruptive...
- znowi 14y agoI actually forgot about it. But, surprisingly, my mom called me and celebrated :) Yay!
- deleted 14y ago[deleted]
- shrub 14y agoLearning new languages and SDKs (Go & Android). Planning the amazing hack of my Nexus Q.
- jaseemabid 14y agoStarted work on my new startup :)
- bwsd 14y agoI'm designing a card for next year.