Thomas Padron-McCarthy

less info
161 reputation
16
bio website aass.oru.se/~tpy
location Örebro, Sweden
age 50
visits member for 3 years, 5 months
seen 2 days ago

Programmer, teacher, reader, writer.


May
25
awarded  Commentator
May
25
comment In languages that don't allow underscores in integer constants, is it a good practice to create a constant for 1 billion?
This is what I usually do. It also has the advantage that I won't forget that I defined NANOSECONDS_IN_ONE_SECOND yesterday and define NANOSECONDS_PER_SECOND today. And perhaps ONE_AMERICAN_BILLION tomorrow.
May
25
awarded  Critic
Jan
31
comment Library design: provide a common header file or multiple headers
@matthias: I don't know their reasoning, but my guess would be that they don't want to export all those single headers in the interface, since then they have to keep them documented and backwards-compatible. It is additional work. (Ok, so there is a reason not to do it, and an answer to my "why not"...)
Jan
31
comment Library design: provide a common header file or multiple headers
Why not provide the common file, but still make the individual files available and documented? Then the users of the library can include the convenient single file until they actually need the flexibility and compile-time performance of the individual files.
Nov
19
comment How would you react if someone told you your code is a mess?
Feelings can sometimes be difficult, but this is certainly how I hope I would react.
Dec
9
comment What's the term for “while(true)” loop with “break” inside?
Is this really called an "infinite loop"? I wouldn't use that term unless the loop is, you know, infinite...
Aug
27
comment Should a competent programmer be able to come up with his own shortest path algorithm?
I agree that yes, a competent programmer should be able to come up with bubble sort or its equivalent. It might even be a productive use of time to actually implement it and try it out, perhaps just to understand the problem better. But I think it needs to be said that no competent programmer would then go on and actually use it in production code. Doing that is what makes your customers come back next year and complain that, now that they have more data to process, your O(n!) algorithm will take twice the age of the universe to complete...
Jun
17
awarded  Nice Answer
May
29
comment Languages on a resume: Is it better to put “C/C++” or “C, C++”?
@Kevin: Sorry if I was unclear, but I didn't include the Stroustrup quote as an appeal to his authority, and it is not because Stroustrup's opinion that I consider "C/C++" as a negative signal. I just used his explanation because, well, I was too lazy to write my own.
May
21
answered Real programmers use debuggers?
May
13
comment Constraints in a relational databases - Why not remove them completely?
"It may be accessed by more apps, now or in the future." Not to mention some database administrator, running raw SQL queries to fix a problem with the database, while the users are waiting...
May
13
comment Constraints in a relational databases - Why not remove them completely?
Minor nitpick: I think it gets a bit confusing when you call the foreign key connections between the tables "relations". The "relations" in a relational database are the tables themselves, not the connections. Especially when we then go on and talk about "relational design" -- does that mean tables, or does it mean foreign keys?
May
12
awarded  Necromancer
May
11
awarded  Teacher
May
11
answered Languages on a resume: Is it better to put “C/C++” or “C, C++”?
Mar
29
comment Most common “Y2K-style” bugs today?
The clocks in all the big, expensive copying machines here at work had to be reset to 2005, since the machines didn't work after new year 2011.
Feb
7
awarded  Supporter
Feb
6
awarded  Autobiographer