801 reputation
515
bio website
location
age
visits member for 4 years, 3 months
seen Dec 19 at 11:59

Donate a cup of food for free: Click to Give @ The Hunger Site


Nov
20
comment Determining the winning condition for Tic-Tac-Toe
And document your code, use meaningful variable names, make it maintainable, write automated unit tests, and keep it in a version control system. Happy coding!
Nov
20
comment Determining the winning condition for Tic-Tac-Toe
"An array doesnt know its size" - you can declare fixed size arrays. As to "significant" slowing, when your CPU executes billions of instructions per second, that will no be "significant". Don't worry about it, no human could ever notice your program "thinking" :-)
Nov
20
comment Determining the winning condition for Tic-Tac-Toe
Agreed, not free, but cheap. Bit-shifts are extremely efficient compared to 2-D array access. That's why we did it back in the day, isn't it? Think of the assembler for your board - just load a segment & an index resister for the 64 bit address, then use SHR, or repeatedly have to load 2 index registers for a 2-D array. Anyway, these days I am all for clarity, testability & maintainability, so that sort of thing is best forgotten (imo)
Nov
20
comment Determining the winning condition for Tic-Tac-Toe
Urk! I would avoid that! If I guess correctly, the programmer is using the 64 bits in "board" to represent the 64 squares on an 8x8 connect 4 board, 1 bit for each and doing some fancy bit shifting. It is efficient; it is the sort of thing I would have done 30 years ago, but on today's PCs, you an afford to declare a two dimensional array to represent your board. That will make your code much easier to read, test and maintain. Start from scratch, then post what you have and we will help you.
Nov
18
comment Detect or Prevent Screen Capture Applications
But it looks unlikely, according to this question stackoverflow.com/questions/774925/…
Nov
18
comment Detect or Prevent Screen Capture Applications
Find out how to hook the Windows screen capture event & take it from there
Nov
18
comment Detect or Prevent Screen Capture Applications
I thought of that myself once & implemented it in PHP. I was so proud of myself until a friend suggested he would use a video capture :-(
Nov
14
comment Is this code solid? If it's not why not? And how should the dependencies be managed?
You might not be aware of codereview.stackexchange.com That might be a better place to post this
Nov
14
comment How do different technologies connect to form a web stack?
Don' forget HTML form submission, which could execute some Java.
Nov
14
comment Why is a python package more perfomant as zip?
Hmm, I didn't think of that, only of networking, but of course you are correct +1 and you should be awarded the answer
Nov
14
comment Why is a python package more perfomant as zip?
Is this client or server? For client, I see no advantage, except for saving on disk space. For server, a zip file will download more quickly to the client.
Nov
12
answered Using PHP or C++ for in real world electronic devices
Nov
12
comment Using PHP or C++ for in real world electronic devices
As a simpler alternative to your Raspberry Pi, you can also look at netduino.com/netduinoplus2/specs.htm (which doesn't have an o/s, which might make things simpler). You can program it in C# or C and it is intended for the Internet of Things.
Nov
10
comment What advantages are there to using Flex/Bison over just writing a compiler straight in a programming language?
You might want to consider ease of development. Personally, I find straight C (or C++ or your language of choice) code easier to debug than Lex/Yacc, which is why I have hand-crafted so many parses & lexxers. UNTIL ... I discovered ANTLR, which only gets better when you find that the ANTLRworks front-end let's you visually step through your expressions as they lex & parse... liek this (Argh! how to insert an image? Sorry, you will have to click the link) antlr3.org/works/screenshots/debugger.png
Nov
10
comment Should I choose to join a programming bootcamp or work as a junior developer?
Take the job. Believe me, we value real world experience over a few courses. After a year or two you will have the same value as someone with a degree & the same experience. Which is to say that once you get some experience under your belt, your degree does not matter (just as your high school exams don't matter after you get a degree). Besides, the job might actually pay beer vouchers - while training you.
Oct
15
comment Adding quirks from an old system to a new system because that's what people are used to - a term for this?
As an aside, doing this for the user is one thing, but almost 30 years ago I worked on a system which was coded from scratch where everyone but me had coem from a prevoius and somewhat similar project. Thus we had eight parameters on the databse access function although only four were needed - becuase the previous project had had had eight. We passed the last four as NULL - with zer0 code re-use. Ah, halcyon days
Oct
15
comment Adding quirks from an old system to a new system because that's what people are used to - a term for this?
What do you call this? Idiocy? One can just about understand the motivation behind this - but for how long will you retain these quirks? And how many more new users will then come to exect them in every new version? There are reasons that cars no longer have running boards or cut glass flower vases.
Sep
24
awarded  Autobiographer
Sep
10
awarded  Yearling
Sep
3
comment Should curly braces appear on their own line?
"95% of the bugs in the program he made came from mismatched braces" - only in interpreted languages, not compiled.