20,098 reputation
14077
bio website thehungersite.com
location United Kingdom
age 46
visits member for 3 years, 5 months
seen 12 hours ago
experienced software engineer with many years in the industry, mostly c++ for large-scale, high-reliability systems.

Sep
11
comment Should I use expect or should when writing RSpec specs?
@back2dos I don't think you read the question....
Sep
11
comment How do you make sure a .net client application is not being hacked to bypass authorization claims?
Actually the end user does have access to your source code. All he has to do is drop it into a decompiler and he has pretty much everything you typed. .NET bytecode isn't particularly optimised either, unlike a C++ program, so the decompiled code looks remarkably good. This is a problem with bytecode systems such as .NET and Java.
Sep
10
comment Time Management System on Local PCs
I used to have a time app that tracked the time spent in each application. Its an eye opener to see just how much time is spent in Outlook and Word, and not Visual Studio :( (naturally, I gloss over the time spent in Firefox)
Sep
6
comment Intentionally incorrect use of language features, specifically “ref” in C#, as a hint to colleagues
yes, use comments. Comments are good and shows that "self-documenting" code can be a bad thing when attempted like this.
Sep
6
comment Intentionally incorrect use of language features, specifically “ref” in C#, as a hint to colleagues
what if he wanted his method to return 2 lists, how would you suggest changing the signature then? (I ask as its easy to say 'just do x' avoiding the intent of the question), BTW his method returns a bool, I assume that's an important return value in the real code, not the cut-down sample posted here.
Sep
4
comment Is using Git Stash as a workflow an antipattern?
"You must never EVER destroy other peoples history" - so true. I'd be happier with git if it never even allowed this to happen in the first place.
Sep
2
comment What's wrong with comments that explain complex code?
@PatrickCollins nearly everything I read on the web is about doing it right first time. Almost nobody wants to write articles on fixing up messes! Physicists say "given a perfect sphere..." Comp.Scientists say "given a greenfield development..."
Sep
1
comment What's wrong with comments that explain complex code?
@trysis haha, yes but in a world where the programmers are responsible and not businesspeople, they'll never ship as they're forever gold-plating a constantly refactored codebase in a vain quest for perfection.
Sep
1
comment Is it possible to modify a native executable and change (dynamic) library it depends on?
You can dump the exports from the dll (use depends.exe or dumpbin) and then re-create a dll with the same library names. You can put whatever code you like in those functions, even if it simply calls the desired function in the new dll.
Sep
1
comment Why does automated testing keep failing in my company?
The lovely green ticks I feel are the problem - it makes testing into some sort of game.
Sep
1
comment Why does automated testing keep failing in my company?
hint: put the TL;DR: at the top - I had to read all your post just to get to it! (which kinda defeats the point)
Sep
1
comment What's wrong with comments that explain complex code?
I disagree in one way - a comment explaining how something bad works is a lot quicker. Given some code that is likely not to be touched again (most code I guess) then a comment is a better business solution than a big refactoring, that often introduces bugs (as a fix that kills relied-upon bug is still a bug). A perfect world of perfectly understandable code is not available to us.
Aug
31
comment Client / Server dependencies with Continuous Integration
Up to you - I usually prefer everything in the same repo, as you can reuse common library code easier, but YMMV. It depends on the size and shape of your processes and codebase.
Aug
31
comment Is this a good design in C++?
You're doing it wrong - Every getter and setter in your code represents a failure to encapsulate and creates unnecessary coupling, definitely getters and setters are evil.
Aug
31
comment Traffic splitter on a single server for 50+ krps
Yes, 4-cores, 4 threads IIRC. You can tune the threads down to single threaded but I'm not sure why you'd want to if performance is your goal. NxWeb is a start point just for giggles, you'd want to write a C/C++ based forwarder anyway, but Nxweb would get something going quickly.
Aug
29
comment Is RESTFUL API as back-end service one of the best (or suitable) choice for Mobile App?
That's only if the data is changing. In such cases, you either need to be stateful, or send the whole lot in one go. For a product list, there's no reason the client couldn't request the list and then request each product individually (maybe as the user views a product)
Aug
29
comment Is RESTFUL API as back-end service one of the best (or suitable) choice for Mobile App?
but the server doesn't need to record chunks. Admittedly it has to be able to reproduce the data required for transmission. The client will ask for what it needs, the server forgets the client after each response. (it might cache the data for a while because you expect further requests, but that isn't "holding state").
Aug
29
comment Deeper understanding of event loops and timers
there is some docs on the web, usually this is the best you get. Textbooks are so 20th century :)
Aug
29
comment Deeper understanding of event loops and timers
we can tell its not homework you'd have said "I wanna make event program, tell me how I am to do this" :) I'm not sure what you need though, accepting clients? Do you mean servers? Do you want a timer to periodically send a message, or just run a task periodically? Async I/O - don't you have this with epoll/kqueue already?
Aug
29
comment C++ Data Server and J2ME client communication
I looked at the API link you gave, it does have HttpConnection in there as part of the spec, "since MIDP 1.0". The API says there is a HttpConnection, and http is what he wants. I don't know what more I can say to help the OP except to point him to the spec's http API, tutorials and SO posts about this. Java.net seems to be the irrelevance here.