|
I have it organised even better, I stay in the country earning money, living in a shoebox and send the wife to meet the movers and do the unpacking.
I expect to arrive home in December with furniture positioned, clothes hung up, knick knacks distributed and not a single wire plugged in. I will need to organise the rats nest living behind the TV and computers.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Sounds like my Dad. Back in :cough:, his battalion was stationed in Singapore when they had to be redeployed urgently back to West Germany. Their CO gave the officers a choice of travelling with the gunners or staying back and returning with their families a few weeks later. To a man, every commissioned officer left the next day leaving all the wives to pack up homes and get everything shipped back to Dortmund. Mum was travelling with the three of us, all pre-school, on a 36 hour five stop flight!
veni bibi saltavi
|
|
|
|
|
If you were really honest, the boxes should all be labelled "Mostly dark matter"
|
|
|
|
|
Duncan Edwards Jones wrote: the boxes should all be labelled "Mostly dark matter (probably)"
It's still only a theory...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Yes - and maybe a few of the boxes should be labelled "Live cats (do not open to verify)"
|
|
|
|
|
|
The entire office should be labeled "Black Hole"
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
And by that, I mean OO principles? Encapsulation, etc. I'm not worried at all about inheritance, and polymorphism is helpful at times. But abstraction and encapsulation seem so powerful to me. OO programming (language does not apply) lends itself to interfaces, discipline, self preservation.
For those of you who sit down in front of VS2xxx or any other OO oriented compiler, do you ask yourself, "Can I put this in a class?" After writing thousands of lines of code, does a bell ever ring, "If you keep digging, the hole is only going to get deeper?"
I live in the embedded world where our code has to adapt to the reality of real life. A machine has inertia and a large number of other physical properties. Sometimes the interactions BEG to be encapsulated in a class where the domain knowledge and behavior can be kept in one location.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
charlieg wrote: For those of you who sit down in front of VS2xxx or any other OO oriented compiler, do you ask yourself, "Can I put this in a class?"
If the design what I put was clear, I don't get into this. But sometimes I rush to complete things and then I get some idea in the middle to break the function into classes. This happens when I realize a large chunk of the code that is sitting inside a function could actually be re-used if we split that into discreet classes with right APIs exposed.
charlieg wrote: A machine has inertia and a large number of other physical properties
This naturally takes you towards C++/(any OO language).
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Once you go class - you never go back.
|
|
|
|
|
A good OO design can give you maintainability and expandability. If your project requires this, you can (and should) do it.
So close to the hardware there is also another aspect: Performance. We are not always in the land of the plenty and sometimes you have to take whatever the processor has to offer. You have to cut some corners and write some 'clever' code to get this performance. This code will be less maintainable and harder to understand. Again, you can do it, but better encapsulate the 'ugly' code in some object and place lots of comments why this had to be done that way.
P.S.: I usually can't wait until the CodeNazis (TM) descend on such code to 'review' it, turn purple and fall off their chairs. They will never unerstand that there is more than one sort of code and that they certainly are not its prophet.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
My highly optimized SIMD functions are in facts encapsulated in a class hierarchy that can provide both autodetection of CPU capabilties to choose the appropriate functions (we still have some old Pentium 4 to support) and to set up a fast access higly optimized class to perform those functions on data with set and unchangeable parameters. That was one of my proudest moments
DURA LEX, SED LEX
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|
+1 for the CodeNazis (I love Grand Theoretical Programmers [who often change their job title to 'architect' without asking and without understanding what that actually means], usually fresh out of uni, in their first job with no experience delivering projects to customers)
"Martin Fowler wouldn't write it like this!" they say. "He ain't *!&"ing here!" says I
I came into this game for the action, the excitement. Go anywhere, travel light, get in, get out, wherever there's trouble, a man alone. Now they got the whole country sectioned off, you can't make a move without a form.
modified 31-Aug-21 21:01pm.
|
|
|
|
|
Brent Jenkins wrote: "Martin Fowler wouldn't write it like this!" they say. "He ain't *!&"ing here!" says I Awesome. He and Grady Booch are going to be the first against the wall when the revolution comes.
Oh wait.
I forgot about the Lotus Notes development team.
And the entire staff from InstallShield.
And the device driver group at Microsoft...
Software Zen: delete this;
|
|
|
|
|
To be fair, I'll bet most of what I'm told Martin Fowler would or wouldn't do is made up 2 seconds before I'm spoken to. He'd probably be pretty surprised by some of the code I've had to work on.
I worked on a solution containing 159 projects a few years ago. All it did was show a login screen which didn't work properly. Domain driven design to the nth-level of abstraction and plenty of unit tests though, which is all your end customers really care about (although they might not know it themselves)
I came into this game for the action, the excitement. Go anywhere, travel light, get in, get out, wherever there's trouble, a man alone. Now they got the whole country sectioned off, you can't make a move without a form.
modified 31-Aug-21 21:01pm.
|
|
|
|
|
When the code of a project is getting bigger and bigger you need classes to find some order. And also you have reoccuring tasks for what classes are best.
Tip: a function should NEVER be greater than what you can read on your screen. Everything else is "Spaghetti code"
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
YES!
The first thing I do when writing new code is design an appropriate class interface. For a class designed to be non-inheritable (e.g. a complex number class), the interface might be merged into the implementation. If the class is inheritable or polymorphic (e.g. the canonical Shape class), then the interface will be virtual, and separate from the implementation(s).
Working this way forces you to concentrate on the design, rather than rushing to a (possibly) flawed implementation.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
Yes I do. I do work in embedded real time systems too, albeit loose real time based on extreme computation speed and delocalization of core functionalities rather than dedicated system, and C++ is as bit as powerfuls as advertised.
Most of our codebased is neither encapsulated nor abstract and that's what my team does in the rare R&D time we have allotted: push functionalities that now are global static unssecure and sparse in a full OOP hierarchy where components internals will be independent from the interlas of other components. Maybe in a handful of years we'll be able to ditch the old, cramped and contorted VB6 interface (whic as of now contains a lot fo, eguh, logic) in favor of something new, maybe C#.
DURA LEX, SED LEX
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|
With no connection to languages I do think OO when thinking of software design...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
I see no problem with that, when architecture is well defined you don'T get to any of those questions. Using patterns also helps keeping stuff clean and simple. That's what it is about, keeping stuff clean and simple.
Objects <-> Logic <-> UI does a good job on keeping stuff separated and makes it more understandable.
So for example, everything that has to do with database access gets in a separate class for that. You put things together that belong together and keep all stuff to that at one place, makes it easier in my understanding.
I think this could also work for you, if your machine has different physical things. Like this is only for lights, this only for left arm, this only right arm, this only treadmill and so on
(Obviously only makes sense when left and right arm do different things)
Rules for the FOSW ![ ^]
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
|
All good comments. In my rant area, we don't have performance issues. When talking to "the machine" (I like that term), some data items HAVE to be coordinated. Rather than putting it in a class, I have it in multiple places. So, I have bugs in multiple places.
I also DESPISE globals. Sure, like goto's, sometimes they just work. And this code is coming from people who ought to know better.
Well, you've cheered me up. At least some consider these things as useful.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
I try not to. I've dabbled a little.
I've done a lot of C, and what I don't like about C# is that everything must be in a class. (And yet no multi-inheritence. )
I prefer to use the right tool for the right job.
And please stop referring to VS as a compiler.
|
|
|
|
|
charlieg wrote: I live in the embedded world where our code has to adapt to the reality of real life. Ironically, that view is one that prevents deep adoption of C++ in the embedded world. There's a widespread perception that C++ includes a lot of overhead that embedded applications can't support. The perception is mistaken. Any loss in performance due to C++ constructs (virtual function calls come to mind) is more than made up by improved engineering. If it's really that much of an issue, C++ can always be treated as "a better 'C'". For that matter, performance requirements that stringent call for custom hardware anyway.
I'm dealing with this myself at the moment. A few months ago I inherited one of our long-term products, which is written in 'C'. The code is over 25 years old. It started life running on two single-board embedded computers, and now runs as a service on a Windows box. It's awful. Globals everywhere. Code reaches up the skirt of data structures without regard to access safety. Hell, it doesn't even follow good structured programming practices half the time. My intent with this crap is to answer questions if necessary. I ain't touching the code with my ten foot pole or anyone else's.
Software Zen: delete this;
|
|
|
|
|
Well, I personally think we always do an OO implementation even when we aren't using an OO language.
It just turns out soooooo much messier and hard to maintain if the language lets you shoot from the hip too much.
Cheers,
Mike Fidler
"I intend to live forever - so far, so good." Steven Wright
"I almost had a psychic girlfriend but she left me before we met." Also Steven Wright
"I'm addicted to placebos. I could quit, but it wouldn't matter." Steven Wright yet again.
|
|
|
|
|