902 reputation
410
bio website
location Portugal
age
visits member for 3 years, 11 months
seen Jul 29 at 22:28

Jul
26
comment Why do binary files load quicker than alphanumeric text files?
You don't need a switch. Just do '0' + x. But your point still stands.
Feb
15
comment How do I maintain consistency between hard-coded values in different files?
If it's not needed at runtime, then you could create a header file with them as constants (#define).
Feb
6
comment Does this justify goto statements?
Why do you even use broken in your first example at all? Just use break on the inner loop. Also, if you absolutely must use broken, why declare it outside the loops? Just declare it inside the i loop. As for the while loop, please don't use that. I honestly think it manages to be even less readable than the goto version.
Jan
12
comment What makes a language Turing-complete?
For imperative languages, are simple variables enough? I was under the impression that some kind of collection (e.g. arrays or linked lists) would be necessary.
Dec
31
comment How do you read this line of code?
"C makes a difference between multidimensional and jagged arrays." Could you clarify this sentence? Because I've seen this distinction in languages such as C#, but never in C. All sources I've seen suggest that C only has arrays of arrays (jagged arrays).
Oct
9
comment Creating a compiler in .net
After the AST you still aren't finished. You need to generate IR code from that.
Sep
29
awarded  Citizen Patrol
Sep
5
awarded  Yearling
Aug
20
comment Do sigils make source code easier to read?
About return = "something";, C# has "contextual keywords", which is also an option worth checking out when designing languages.
Aug
18
comment When is it ok to use a Global variable
@aqua Multithreaded applications are where global variables can be most damaging. Everyone hates complex locking logic.
Aug
18
comment Do sigils make source code easier to read?
Case insensitivity has the problem of internationalization, though. If you allow characters from many languages, you may run into names that are "the same" in some locales, but not in others.
Aug
16
comment Which programming languages are multi-platform, fast, and object-oriented with non-limiting low-level os access?
About C#, have you had any bad experiences with MonoDevelop on Linux?
Jul
23
comment Is a “start”, “run” or “execute” method a good practice?
Examples of classes with Start methods in common APIs include threads and stopwatches.
Jul
1
comment Why is an operating System denoted as 32 bit or 64 bit
@Ampt IIRC, MIPS instructions have a fixed length, but x86/x64 instructions do not. See stackoverflow.com/questions/1399861/…
Jul
1
comment Why is an operating System denoted as 32 bit or 64 bit
The part about 64bit processors is confusing. It sounds as if you're saying that the instructions themselves take up 64bits.
Apr
29
comment Are Intel compilers really better than the Microsoft ones?
"EDIT: arm does not have an arm compiler." is this really what you meant?
Apr
28
comment Are there pre-made commercial software licenses to choose from?
@MorganHerlocker Clause 6 of the Open-Source Definition rejects such licenses. About "even for the owner": IANAL, but if he's the sole owner of the copyright, he can license it pretty much any way he sees fit.
Apr
21
revised Is it possible to reach absolute zero bug state for large scale software?
fixed small mistake
Apr
20
comment Is it possible to reach absolute zero bug state for large scale software?
@JoanVenge I quoted that example to show how tricky bugs can be to find. In this case copy pasting was actually the right thing to do since it was proven correct and implementation written from scratch would most likely have more bugs. The tools and practices we - as an industry in general - are using is certainly not optimal. Best practices are easy to ignore and bad habits are easy to keep. Ultimately, bugs will always exist because humans are not perfect. But we can reduce the number of bugs by doing our best and insisting on high-quality education.
Apr
20
answered Is it possible to reach absolute zero bug state for large scale software?