175 reputation
6
bio website N/A
location Arizona
age 24
visits member for 2 years, 5 months
seen Sep 15 at 21:45

Most knowledgeable in:

  • Python
  • JavaScript
  • C/C++
  • JASS

May
6
comment Spoiled by Python convenience- and productivity-wise, spoiled by C++ speed-wise. Now unhappy with both
Instead of looking for another language, have you first considered profiling your code for 'hot spots' and rewriting those spots in a C binding so as to improve the speed?
Aug
17
comment What are the benefits of prefixing function parameter names with p*?
@TikhonJelvis Not all languages support typedefs that are strongly enforced (e.g. C++ typdefs). For the languages that do support it, you are quite right.
Aug
17
comment What are the benefits of prefixing function parameter names with p*?
@WyattBarnett Systems Hungarian doesn't give a programmer any useful information with modern IDEs. Apps Hungarian can reduce headaches in code reviews when they are correctly enforced.
Aug
17
comment What are the benefits of prefixing function parameter names with p*?
Systems Hungarian Notation is a terrible practice that should be avoided. On the other hand, some Apps Hungarian Notation can be useful (such as for preventing unsafe user input from getting misused).
Aug
17
comment Should I take care of race conditions which almost certainly has no chance of occuring?
This too! Avoid having other programmers ponder about possible problems when reading your code, by doing what is necessary (even if it is 'unlikely' to fail).
Aug
17
comment Should I take care of race conditions which almost certainly has no chance of occuring?
I'm surprised no one has mentioned Murphy's Law.
Aug
3
comment What backs up the claim that C++ can be faster than a JVM or CLR with JIT?
JIT has a positive effect on performance, not a negative, if you put it into context -- It's compiling byte code into machine code before running it. The results can also be cached, allowing it to run faster than equivalent byte-code that is interpreted.
Jul
24
comment Are there any design patterns that are unnecessary in dynamic languages like Python?
@MartijnPieters I misinterpreted your comment as a response to his first post, my mistake. To continue the conversation, IIRC the len function on a string actually looks up a constant already cached on the object. On other objects, it calls a special method (__len__). It's more of an interface thing. :)
Jul
24
comment Are there any design patterns that are unnecessary in dynamic languages like Python?
@MartijnPieters How is len not an object?: >>> len <built-in function len>
Jul
18
comment What do you say in a code review when the other person built an over complicated solution?
A good rant to explain the situation to your colleage: "Why did you not KISS? YAGNI!"
Jun
13
comment Learn programming backwards, or “so I failed the FizzBuzz test. Now what?”
Agreed on most points, but why do you consider Java 'the worst language ever designed'? I'm not a big fan of Java, but this sounds very opinionated.
May
25
comment When using method chaining, do I reuse the object or create one?
+1 for the 'Entity' vs 'Value' question. It's a question of whether your class is a mutable or immutable type (should this object be changed?), and completely up to you, though it will affect your design. I wouldn't typically expect method chaining to work on a mutable type, unless the method returned a new object.
May
16
comment Firefighting allocation problem
This sounds like a version of the knapsack problem, which is known to be NP-hard. It simplifies down to the problem, if you treat the sum of the fires' danger level as the capacity of the knapsack, and one combination of the firefighters to their respective trucks (e.g. 5 firefighters to each firetruck and 2 to the leftover firetruck).
May
10
comment Python 3, replace in strings
@MasonWheeler My intent was to get him to give more details (perhaps this is some weird Hebrew HTML).
May
10
comment Python 3, replace in strings
>>> (replace certain things in some position but not in other, so a global replace won't do) What determines exactly which elements should and should not be replaced? Is it possible that matching a regular expression against your string can do this?
May
4
comment Is it bad practice to name an unused variable with a single underscore?
Your second point contradicts your main point: in Go, that essentially means the same as "I have no use for this value".
Apr
8
comment Motivation Problems, Middle School Programmer
If you truly do know everything then why not combine building up your resume with building an interesting project?