|
It is the only way innovative code ever got written. The idea starts in your head and the structure that makes it work has to be coded up fast before it falls out of your head. At this stage I don't worry about public and private, const correctness or compiler warnings. I'm just interested in getting it all connected up so I have something to run and test. Then I go back and deal with const correctness etc. because that will help with writing the rest of the code. Nobody wants to admit that there isn't much between idea in head and working code.
|
|
|
|
|
I wonder how many "Me too" responses there are here. Might make a decent survey question.
Me too, btw.
|
|
|
|
|
That is a very wise way to approach something new. It lets you get basic functionality working ( and discovering any quirks or poor performing code).
Then, especially if you use a repo so you can rollback an “experiment” easily, you can build on it. Refactor functionality as necessary to keep it somewhat atomic or genericize some of the code.
Yours is a useful post to start my day.
|
|
|
|
|
Several coding secrets:
1) Being consistent -- Use the same naming convention, indentation, structuring, etc., throughout all code.
2) Small modules -- Typically 40-60 lines or so.
2a) Module on a page -- Look at a complete module without having to scroll/page through it.
3) But not too small -- Avoiding 1-3 lines of actual code as a function (nothing more ineffecient than looking at 10 lines to see something like "int GetAsValue() { return A; }"
4) Nothing fancy -- Avoid complex templates, macros, etc.
5) Adding some comments for relatively complex code, but avoiding unnecessary comments.
6) And, finally, frequent trips to the coffee pot, with associated trips to the men's room, to get the body moving and the blood circulating.
|
|
|
|
|
I do this, and I consider it part of *design*.
It helps me come up with the algorithms that I need before I actually implement them for keeps.
To err is human. Fortune favors the monsters.
|
|
|
|
|
I do the same thing...
I have come to call it Regressive Analysis.
Steve Naidamast
Sr. Software Engineer
Black Falcon Software, Inc.
blackfalconsoftware@outlook.com
|
|
|
|
|
Agreed. When the problem is a difficult one, my first-cut solution will be complex. A beginning programmer might review the code and conclude "this guy is Smart! I could never write code like this." Then I take some time away, come back, boil it down and refactor into something clean and elegant. The same beginner would then review it and conclude "of course this is correct, this is the way I would have coded it."
|
|
|
|
|
as a comparison to painting, many sketch a rough outline, then fill in, then maybe shift an arm, or even blank paint over the whole thing and restart knowing oh, i wanted the eye line pointing here,
then refine, add detail
few, very few and after many years of crafting get to drawing final lines first time.
and fewer still start their carriers with being able to finial look
first attempt of pure gold, might be a fluke and not saying it bad, but understanding WHY you did it that way can become more important of being able to intuit the solution but not explain.
|
|
|
|
|
i am a master at doing only the first part! as soon as i try to refactor... someone brings me some other fire. its rare that i get to feel happy with the code i did.
|
|
|
|
|
Just as I finally managed to wean some people off of IE and onto Edge last year (yes, it took 'em that long), now Edge is nagging them to get off of Win7 and onto something newer as the browser will no longer update itself on that OS.
Realize that changing browsers is a big deal for some people. Now I'm being asked to get them used to a whole new OS. Which is gonna be a pig on old hardware, which is performing otherwise just fine with Edge + Win7.
Chrome isn't an option (I'm looking at their support page right now) as the last version to support 7 is 109, which came out exactly a month ago today.
The Firefox support page for the latest (109.0.1 as of this writing) says it supports 7. I don't think switching these folks over to FF is gonna be a good option anyway if I'm gonna have to find yet another alternative a few months down the road (I'm looking at a page suggesting August 2023).
This is perfectly capable hardware, and runs Windows 7 just fine even with recent browsers. I know the hardware won't perform as well with 10 (and 11 has its own (totally artificial) requirements).
In terms of hardware requirements, Linux might be an interesting alternative. But not for these people. I'm out of ideas. These folks can't afford new hardware "just because" browser makers no longer want to bother supporting 7.
What OS feature are modern browsers relying on anyway that they can't keep supporting 7? Security? Let them agree to a disclaimer and let them carry on with their lives.
|
|
|
|
|
dandy72 wrote: disclaimer
Eh? disconinued support means exactly that: "May or may not work on 7"
[EDIT] sorry, I reread your post. I am pretty sure updates would break your old browser. They simply do not examine if it will break or not. Why not be happy with an un-updated browser ?
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
Updates are the problem, not the solution.
|
|
|
|
|
Yes. And I said: why not avoid updates?
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
The installer for newer versions ID the OS and tell you upfront, it won't install. If it was just "may or may not work", that wouldn't be half-bad.
megaadam wrote: Why not be happy with an un-updated browser ?
(a) The constant nag
(b) If history's any indication, more and more pages will just have their rendering completely mess up by browsers that aren't keeping up, making them even less usable than risky security.
|
|
|
|
|
dandy72 wrote: I know the hardware won't perform as well with 10 Are you sure? I seem to remember that I was pleasantly surprised when I installed W10 that it seemed nimbler than W7.
Mircea
|
|
|
|
|
The machine in question is maxed out at 4GB of physical memory. I know Win10 works in a VM with only 4GB (on a faster host), but you don't get very far without starting to page like crazy the instant you try to use a browser. 7 isn't nearly as bad.
|
|
|
|
|
I don't #$%^'in care.
I have chrome's win7 nag shut off with a registry edit and use seamonkey browser anyway.
Firefox is a dork like sears and ibm.
|
|
|
|
|
Ron Anders wrote: I have chrome's win7 nag shut off with a registry edit
Stopping nags through a registry entry is very much a Microsoft thing. Chrome is also doing that now?
|
|
|
|
|
Nothing is telling me I have to uninstall IE on any machines that matters. You set your "preferred" browser; you're not actually "changing" it. If it can access the sites that are needed, it's not an issue at this time.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Just noting that on Windows 10 there was a auto-update that disabled IE and replaced it with Edge.
Researching the fix and getting it back was not really something that some people who are nervous around computers might want to undertake without kindly instruction.
|
|
|
|
|
That's the problem, a lot of sites nowadays have completely stopped paying attention to IE, and rendering is completely broken - even MS's. It's just unusable nowadays.
|
|
|
|
|
Why do you need to change browsers at all right now? If you / they are happy to run an older unsupported OS (Win 7) why fret about an older unsupported browser (Edge, Chrome or FF)?
|
|
|
|
|
Because sites refuse to let you connect using older/no longer supported protocols; pages aren't tested and rendering is completely messed up, etc.
Generally I have no problem using software that is set in stone, but a browser, by its nature, tries to connect to something - the web in this case - that is constantly evolving.
|
|
|
|
|
I get the need to leave IE (its been deprecated for several years) but all the other choices have only very recently dropped (or will drop) support for Win7. I suspect you're going to be fine with today's versions for several years before protocols change enough to matter.
|
|
|
|
|
dandy72 wrote: Realize that changing browsers is a big deal for some people
I run Windows 10. For the most part it looks like Windows 95 with addons that I have added.
|
|
|
|