4,271 reputation
11026
bio website code.google.com/p/…
location San Diego, CA
age 30
visits member for 4 years, 3 months
seen Dec 17 at 20:33

I'm passionate about coding and researching the history of technology as well as exploring where technology is leading.

I used to work in flight simulation doing both hardware implementation (electrical design, wiring), web development (design, development, webmaster), as well as software development (desktop development in C#).

I'm a big fan of both using and contributing to Open source projects.

I am the creator of the pypreprocessor library that can be found on PYPI as well as Google code.


Feb
10
comment What is a real-world use case of using a Chomsky Type-I (context-sensitive) grammar
What about HTML 'quirks mode' and code preprocessors, wouldn't they count?
Feb
7
answered Why don't we use a class and its static members to do what a singleton does?
Feb
7
comment Why don't we use a class and its static members to do what a singleton does?
Because the Singleton pattern came from GOF and GOF is cool... /s
Feb
1
comment How do programming languages benefit from being based on English?
I completely agree that trying to shoehorn English grammar into programming languages is a complete mistake. I don't agree with "this meaning is very jargon-y, specialized". As a native English speaker, describing concepts as analogues to pre-existing terms is typical of everyday communication. English as a language is just loosely interpreted and very context-specific in general. As for the German equivalents, it's not a big surprise. English borrows much of it's structure from German, and a lot of it's vocabulary from other languages. It's like the 'mystery meat' of natural languages.
Feb
1
comment How do programming languages benefit from being based on English?
Why is Italian the language of musical notation or Latin the music of Science? For technology it's English. With international acceptance as the 'lingua franca' it's inevitable that English will have the most extensive technology-specific vocabulary. A rich vocabulary is essential to effective (and universal) communication, so people are willing to adopt the language.
Jan
30
revised Shipping my first class library. Any gotchas I need to be aware of?
deleted 24 characters in body
Jan
29
comment What should my “code sample” look like?
If he's smart, he's probably trying to see if you'll just copy code straight from the web. Being able to copy and integrate code is a lot different from actually understanding it. Considering the amount of copypasta there is in the PHP community, that's one red flag I know I'd check for in a new recruit.
Jan
26
awarded  Good Question
Jan
25
comment I don't understand why algorithms are so special
Just take a good long look at how Quantization and Huffman Coding are used for lossless compression in the MP3 and JPEG formats. I mean, really understand it. Then imagine that the majority of electronic devices sold today provide hardware implementations of either or both. Physics is amazing because it involves understanding the underlying mechanisms of nature, algorithms is the same but the mechanisms are all man-made. Algorithms are the meta-language of machine consciousness.
Jan
25
comment I don't understand why algorithms are so special
While applying existing algorithms is well and good, practicing the art of understanding and developing new and novel algorithms is not only challenging but requires a high degree of creative (ie divergent) thinking ability. As opposed to memorizing (ie convergent) existing implementations. Not everybody is satisfied with mindless assembly. Algorithms are the soul of programming.
Jan
25
comment I've been told that Exceptions should only be used in exceptional cases. How do I know if my case is exceptional?
+1 The number spinner is an especially useful example. For the Op's specific case, UI feedback would be the best approach for an invalid or unmatched input. An exception would be used of, for instance, the wrong type (ex an integer instead of a string) is encountered.
Jan
25
comment Implementing the command pattern in a RESTful API
In this case the URI should represent a transaction where debiting (taking money) and crediting (giving money) are actions done via POST requests. POST is used for both because each time money is moved in either direction it represents a new transaction being created. In your specific case, the transactions are taking place on a cardholder's account so the card's account number is the resource URI.
Jan
25
comment Implementing the command pattern in a RESTful API
(cont) Database logs use transactions in a similar manner. That's why it's possible to replicate and/or rebuild a dataset using only the logs. As long as the transactions are replayed in the chronologically, it should be possible to rebuild the dataset from any point in its history. Removing mutability from the equation ensures consistency.
Jan
25
comment Implementing the command pattern in a RESTful API
@Mithir I was describing the accounting rule. In a standard double-entry bookkeeping system you never remove transactions. History once committed is considered immutable to keep people honest. In your case you could still use a DELETE action but on the back-end (ex general ledger database table) you'd add another transaction representing crediting (ie giving back) the money back to the user. I'm no bean counter (ie accountant) but it's one of the standard practices taught in a "Principles of Accounting I" course.
Jan
25
comment Implementing the command pattern in a RESTful API
I would have elaborated in an answer but Gary's answer already covers most/all of what I'd add. I say it's not rest because URIs are only supposed to represent resources (ie not actions). Actions are handled through GET/POST/PUT/DELETE/HEAD. Think of REST as an OOP interface. The goal being to make the API fit the general pattern and decouple it from implementation specific details as possible.
Jan
23
comment Implementing the command pattern in a RESTful API
+1 "technically this should not be allowed in a balanced accounting system". Somebody knows how to count beans. That statement is absolutely correct, the way to reverse would be to create another transaction crediting the funds back. General ledger entries should always be considered immutable and permanent once a transaction is completed.
Jan
23
comment Implementing the command pattern in a RESTful API
Short answer, that's not REST.
Jan
11
comment I've had 7 jobs in 16 years. Is that OK?
Oooh, simulators. Flight or combat? I used to do electrical design/wiring on commercial flight sims. The work was extremely challenging and a ton of fun.
Jan
11
answered What is best pratice for user stories containing two roles
Jan
11
comment Effectiveness of FizzBuzz and Beyond
An even better question is, is this problem deterministic or non-deterministic? In all seriousness, this question should be doable for anybody who has ever used a substr() method.