Reputation
1,206
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
6 24 53
Impact
~210k people reached

  • 0 posts edited
  • 1 helpful flag
  • 470 votes cast
1d
comment Driving Linux input events from serial device
@smeeb When a keystroke is pressed or the mouse is moved, your code can listen for such a hardware interrupt. This is the most effective method to handle keystrokes and mouse.
1d
comment Driving Linux input events from serial device
@smeeb Interrupts can do anything and everything. If you study interrupts and have an interrupt service routine you'll also learn how to make a context switch. You can read about this in the book "Operating Systems" by Andrew Tanenbaum.
Apr
27
comment For loop and recursion for a new shell in C
The recursion I've come up with is 1. Check if command contains the pipeline delimiter and call a function that is recursive for every substring, save the substring and make recursion until the substring doesn't contain a delimiter, and I will end up with a delimited list that a can execute: {echo} {'foo bar'} {|} {awk} {'{print$1}'} {>} {output.txt} and the state machine can depend on the current delimiter (', ", |, <...)
Apr
26
comment After breaking our code into reusable bits, how do we test and deploy?
If you please include estimates KLOC (1000 lines of code) and byte measures of the code we can easily get an idea of the size for example "2000 lines of code. 50 kilobytes source code." or "40 KLOC, 2 GB XML". . It seems what you need to just migrating to git and git has import functions. You can start by reading the git book.
Jan
28
comment Should an Http API always return a body?
+1 for "fetch only what is needed (and not more)"
Dec
10
comment Why not use the word bug instead of exception?
@ThePopMachine Because I like huge bounties for questions other people might find interesting. I'm reqrding my "popular" questions and answer as much a I can. I've had much help from the good and fun questions and answers. I'm also preparing a new question about error handling and error codes for this programmers..that is not specific how to write code but how to handle errors in a limited and hopefully standardized way for exmple for webapps that can return a limited number of error codes, how deafults are good and naming of code parts.
Sep
27
comment Are long compiles a thing of the past?
A recent large project took me 40 minutes to compile (40 000 source code files compiling with Maven). The workaround is to paralliize the compilation on many CPU cores.
Mar
30
comment Algorithm for base-conversion in C?
Thanks. I updated my question with a function that seems good.
Feb
24
comment How to write camel case for words like “phonenumber”, “motorcycle”, “wavelength”, etc
But phoneNumber looks as wrong as passWord and setUp. Shouldn't it be phonenumber since its a word of its own and not a concatenation like motorcycleColor" or phoneColor` ?
Feb
22
comment How to encapsulate method parameters in Java?
I want to know what is a good Java ADT for a parameter list. If I first have updateMethod(String s1, String s2) and then need one more parameter for a third parameter updateMethod(String s1, String s2, String s3) then its like a varargs and with all strings that would be Map<String, String> or Map<K, V> for any types. So I wonder if I can have just an updateMethod(Map<K, V> map> for any number of parameters of any types.
Oct
13
comment Why does the instruction “do” require a “while”?
What we're trying to program in an instuction that does do foreverand I think that could be just do { ... } but that is mostly not allowed.
Sep
3
comment Why would one transform a checked exception to an unchecked exception?
@Kemoda I knew I didn't know. Now I must know why not.
Sep
3
comment What is the one or the few major changes from Java 6 to Java 7, couldn't JBoss do that already with Java 5?
Thank you. That looks very good.
Aug
25
comment Is Perl outdated for CGI and FCGI?
@ott-- That was interesting, can you elaborate? My colleague next door was a 100 % Cobol programmer. I like C, Java is too large.
Aug
24
comment Is Perl outdated for CGI and FCGI?
@StevenBurnap My Government still codes in COBOL, yes.
Jul
22
comment Can we illustrate a CPU pipeline with a UML sequence diagram?
@RobertHarvey Ok...But it's still not strictly UMl and I'd like to be clear about what's data and what's time. In this illustration data is just flowing back and forth and propagating, there is no easy way to follow time like an UML sequence diagram has.
Mar
7
comment Is there a constant for “end of time”?
@JimG.I updated the question with an example I just saw. A blogger wants to write a welcome page.
Feb
4
comment What's a good way to explain the need for pointing to a pointer?
@Brian I agree that the example you put in is very good since it's common. It's one I've seen.
Dec
10
comment How many bits' address is required for a computer with n bytes of memory?
Nice answer, many thanks.
Dec
10
comment How many bits' address is required for a computer with n bytes of memory?
OK so for 512 Mbyte RAM the equation is 512*1024²=2^x(?) Thanks a lot for the prompt answer.