« first day (3455 days earlier)      last day (1478 days later) » 

4:59 AM
Has anybody benchmarked the time it takes a process to spin up on Windows? Like if you invoke a C++ program with minimal dependencies how long does it take to start?
 
5:14 AM
So if you want a program to constant run so that it can receive IPC commands, that would be a Windows Service right?
 
 
4 hours later…
user7659542
9:02 AM
@JerryCoffin when does code start being considered as old?
 
user7659542
@StackedCrooked imo everybody should be able to easily take over everybody's code at any moment, which is why I am against code ownership. Nobody owns no code. If there were an owner and that owner were to leave you'd see the ship get out of balance
 
user7659542
@Mikhail urgh, Windows...
 
9:58 AM
@traducerad I agree if the team is competent enough.
 
10:49 AM
I own all your code (and derivative works)
Also Windows is pretty solid, few allocation failures, few spurious wakeups, drivers rarely crash
 
11:27 AM
If I had made a 3D toilet paper printer, I could have made a fortune by now :p Another opportunity lost ...
Imagine you could add used paper, grass or tree leaves to a machine, add a sachet of 'paper additive'. With a press of a button, the the machine gives you fresh toilet paper.
 
11:47 AM
I have been watching DIY toilet paper making videos. Apparently, in home use toilet paper making machine, you just need a blender that blends used paper with water and bleach to make fluffy white paper pulp. Then use a heater dry the paper pulp. The paper is run through a cutter to make it the right size, roll it on to something. Of course there are many details, but that's the rough theory >_<
Mass production probably can reduce the machine cost to under $100.
 
 
3 hours later…
2:27 PM
@Mikhail Yes, it's like a plugin for our platform that was designed to handle SMS gateway
the plugin I had to modify had this generic method that simply does a get request and allow you to format the url in a generic way.. Well the gateway I found that was the easiest to support had a rest API through POST... so I ended up rebuilding the module to create a common interface for phone/message to send and allow different backend to do their job
it's technically generic only because an interface is there that can be implemented for different providers... but the moment we need to pass something else than a phone + message... that interface is going to be broken again..
@StackedCrooked I'd say a good library is a result of continuous improvement over a bad library. It doesn't get there in a day.
 
 
1 hour later…
4:02 PM
@traducerad Definitions vary, and I'm not sure there is one that's really better than the others.
 
4:57 PM
@JerryCoffin In your opinion: what are some properties of good code. What about bad code?
Sorry for bothering you with this :) It's a question I often ask during job interviews.
And I wondered what you'd reply.
 
5:25 PM
@StackedCrooked Seems like a lot of them are fairly obvious and well know: things like readability, cohesion, coupling, repetition, etc. Umm...as to things Getting beyond those, I think the thing I've seen more often than anything else is simply a lack of a clear idea of what problem code is really intended to solve. Some of it is undoubtedly a matter of unrelated code having been hacked into the wrong place during maintenance.
All too often, however, there's this kind of amorphous blob of code with no clear picture of what it really does.
I suppose the people who are into such stuff would classify that as poor cohesion and (probably) tight coupling, but what I'm thinking of is a little higher level than I'd usually think of in those terms.
 
@JerryCoffin Not understanding the problem is definitely a big one. I've been there myself: I've written lots of code at my first job in the graphical industry, and I hardly knew what "cropping marks" meant.
Also interesting that you didn't mention abstraction, generality and reusability.
 
I tend to see those more as a by-product of good code, not essential ingredients, so to speak.
 
Yeah. I think those things can often be a distraction from solving the real problem at hand.
 
 
1 hour later…
6:49 PM
Anybody knows a site like pythonanywhere but for c++?
 
One big problem for gui codes is having important logic in the callbacks rather than associated with specific objects. For example, a tooltip needs to stay updated. A poor design would generate the text inside the tooltip. This is bad because its hard to track down when you want to modify the object. A developer might have forgotten about this functionality. A better approach is to put the tooltip text generation into the object, so that the callback does minimal work.
I've been mostly unhappy with my Qt code, which is a majority of what I write :-)
 
@Mikhail You mean the tooltip shouldn't contain a copy of the text, but instead should dynamically generate the text every time it's invoked?
The secret to writing good Qt code is to reduce the amount of Qt code.
Basically, only use it for the "view layer".
@Mikhail Sorry, I know you're probably beyond this level :)
 
7:24 PM
Yeah my comment was cut short by SO chat.
Basically the object that changed should have a get_tooltip() instead of having the formatting occurring in the callback
With callback heavy GUI code, you often have logic in hard to trace places.
 
7:45 PM
@Mikhail Yep. I agree.
Callbacks should be simple: ideally they should be mere "glue code" that calls the business logic, and not contain any important business logic.
Large lambda's are not good.
I mean, I've never seen a large lambda that was good. (My Trump imitation.)
 
triply nested lambdas are where it's at :P
 
@PeterT As long as they're short I'm fine with that.
Triply nested invocable templates. That sounds super powerful.
(Or super disastrous when used by the wrong developer.)
 
 
2 hours later…
10:46 PM
Heres another brain teaser for you guys. DLLs have global variables that are stored in different places for different processes, so that each process has its own copy and "sees" different values. Where exactly are they stored, and does each process use a separate memory page?
 
.bss ?
and I would assume either own pages or cow
 
Yeah, but that means that you can easily get a gigantic memory consumption if you have like 10 dlls per process and like 200 processes
What if you compile your DLL with large pages ;-)
 

« first day (3455 days earlier)      last day (1478 days later) »