Friday, February 27, 2015

On Optimization

People seem to ignore the effects of age and chance.
Something might not need optimization but might need it in the future when the system is more complete, has more users, or has more applications. so in this case, it may a good idea to optimize (up front).
Secondly, there is a lot of code that is slow but not slow enough for humans to feel it positively but it causes sluggishness at the borders of perception.  Optimize if possible and/or easy, and/or to add polish,  to improve the customer experience,  even if the improvement is not obvious.
Especially if the SW has a long life ahead of it.  An obvious example would be the fidelity of music.
To assert that only the highest fidelity of audio that is necessary, is desired, is false.
Those blanket "don't optimize don't do this or that" are not universal truths.

Tuesday, February 24, 2015

Good software design and simplistic ideas about life.

Software and Life
When software, or life, has unforseen difficulties, breakage, or simply does not work in unexpected situations or events, is this a problem or an opportunity?  Do you believe that a person can be designed not to experience troubles when random difficulties emerge in life?  No... the way to do that, is to allow for changes, to test oddball situations.  Not to try to make things perfect the first time.
Good software has been stressed and tested in real-life situations, allowed to break, analyzed, and improved.
If the user does something wrong, is it an issue, if the software crashes or breaks, because of the user's error?
Some developers think it's not.  However, the best software is written to handle breakage, errors, the unexpected, and oddball cases.
Do car companies design cars to work in ideal conditions? No. They break cars to see what happens, put them under stress, and make cars that can last through problems in the environment and some abuse.  The best cars can handle a lot of abuse.
In our lives, when errors occur, do we learn and survive, or simply break and die?
There are two schools in making software: simplistic, and real.
A simplistic school maintains that you design software carefully, so that when it is implemented, it works.
The problem is, no amount of planning can forsee the odd cases.  It is necessary to break software, to use it incorrectly, to write code that handles problems of usage and abuse.
The philosophy that problems of usage don't matter, is wrong.
The good philosophy is that we plan to break.  We anticipate changes.  Software adapts intelligently,  and gets better than it would be if not used incorrectly and analyzed.
Changes can break things, but breakage solves design problem that would not be seen otherwise.
Look at living things.  They evolve because of those 'survival' mechanisms that are so cruel, and end up producing the most nearly perfect biological creatures you can possibly imagine.

Thursday, December 11, 2014

Most general trick of all?

Here's a great trick:
If you do a great job, even if it takes a longer time, it's done, and you ended up better off, than if you did it quickly, but have to keep coming back to it to fix thing.
Or if you did a good job and made other work that comes in the Future, easier, you've also done it.
So the ultimate judge is the indefinite future.

Thursday, June 19, 2014

Windows 8.0 Bugs upgrading to 8.1, for New Computer Owners!

There are a couple of issues with updating the new computer to 8.1
First is that it's faster when plugged in with an ethernet cable, (for example to a router directly connected to modem).
The Problem: windows 8.0 will not connect unless WiFi is turned OFF on the computer (maybe rebooted).
OR the setting for preference to connect is CHANGED so that the ethernet cable is preferred over WiFi.
That's a bug in 8.0.
It's always a major pain in the ass to find the ethernet/wifi network settings!
There is no start button in 8.0. 
It's even VERY difficult to find a 'shut down and restart' or just shut down button!
Whoever designed the user interface in 8.0 should be fired.  Microsoft you STILL suck!
(but only sometimes, problem is it's the WORST times such as for new users. You're as bad as GM with their ignition switches!)


Wednesday, January 8, 2014

The Magic Line, cross only with extreme care.

Between the current manipulation of the model, and the model's data itself, which ought to be totally independent of any manipulation of it.  (needs a clean layer between them).
Simplistic Plan for converting the messy monolithic interface into the easy clean one:
1) Create a duplicate of the data, in the desired idealized format, and maintain both.
2) Write a conversion so that whenever the messy monolithic current version is presented without the idealized one, the idealized one is created from the messy monolith, thus converting old data to new data on the fly when it's encountered.
For example in my current work, my monolith is an ultrasound sector of say 300x400 which represents a radial (polar) sector of 70 degrees at 12CM depth.  This is the image.  The angle is represented by 36 lines of data and 2000 samples represent the distance from the origin (the ultrasound transducer).
So now we need to manipulate (measure with gui tools, enhance, etc...) a new image, 15CM, 90 degree angle, different dimensions, number of lines, samples,.... And all the code is broken! (the code that was created for the 300x400 70 degree 36 line 2000 sample images).

Tuesday, January 7, 2014

Fundamental Design Principle

A fundamental design principle, I know because I violate it frequently, is to always operate on a model of the data, not on the data itself.
In my job, I write code to manipulate an ultrasound image or sequence, with measurements, cursor positions, scaling, image processing, etc.  It only gets worse and worse, the longer I interface to the data itself, rather than interfacing to a idealized model of the data, and subsequently displaying the idealized data, such that the idealized data would never have to be converted, but only re-realized onto a new platform (a new scale, new dimensions, sector angle, hardware, etc).
For example, if a measurement on the ultrasound image is at (x,y), then it needs to be converted to the polar coordinate (distance,angle) distance from origin and angle, before performing any computations, and the positions need to be saved in the model's (distance,angle).   To save a position, the image (x,y) is converted FIRST.
This allows any image in (x,y) to be produced, and manipulated,  and the computations only need to be done once, in (distance,angle) polar coordinates, in the original model's representation.


Thursday, November 7, 2013

There should be good ways of applying external discipline to coding and design, so that good structure is maintained, (minimize dependency, allow changes, allow removal and insertion of functions easily, etc)
What are those disciplines?