Tech Is Hard

Credibility = Talent x Years of experience + Proven hardcore accomplishment

Category Archives: opinion

Good Is As Good Does


If the technical situation in the environment is not getting better over time, then the team’s output is not good. If the output is not good, what are we doing it for? And can we call ourselves good if our output isn’t?

Advertisements

Model


I so hate how poorly MODEL is understood in Web development – quote from mongoose thread: “Try not to push too much down to the model – helpers on the model are
generally to ensure the integrity of the model, rather than for enforcing business logic”.
But here’s the definition

Finally, the model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).[3]

“Application domain”.  That means business logic, if it relates to the state of the object.  Can’t you guys just rename your thingies data abstraction classes?  That’s what they are.

A virtual property, or a property with accessors, should be available in every type of access on the model. That’s how we hide the details of of data representation in the model.

Software Developers in the Past were Much Better than Today (as a whole)


Can it be argued with?  It seems statistical truth.  Back in the 70s, 80s and part of the 90s, way before everyone and their brother was a “Web developer”, there were few enough people doing the work that the percentage who were very good — with various language, scientific, mathematical and electronics backgrounds — was MUCH, MUCH higher than it could possibly be when MANY, MANY more people are doing it.

Let me put it another way: if the NFL decided to kick start a few thousand more football teams, do you think the quality of play would be the same as it is today?  Wouldn’t there be a lot of people playing that currently don’t have the skill?  There can only be so much supply for a highly-skilled profession.  People can’t just  choose to be good software engineers any more than they can go out and simply train hard enough to be a talented professional football player.

So the number of really good software people has gone from maybe 1 in 10 to 1 in probably 12,000, if you crunch the numbers.

An outcome of the same internet explosion that has outstretched the top quality supply is that everyone can spout off.  It seems too, the amount of self-promotion is inversely proportional to meaningful understanding or communication.  So there’s often this large, single, near-unanimous, overwhelming, AND HORRIBLY WRONG opinion or impression of a concept and how to implement it.

I have to say that it’s possible to be self taught and as good as the educated/highly-experienced.  But it’s very, very unlikely.  The catch is, the self-taught  don’t know enough to know how little they know in comparison.  That is also logical.  When one’s knowledge is limited, he has no way of seeing it.

I’m sorry.

Look What I Done


Why does it bother me to see people broadcast their successes, however trivial, so they can get a “go, you!” from others who either already should have voiced their support and shared in the joy, or people who have no business in it?  It’s the more so, because, as I understand, these wall whisperers have families and close friends whom they share time and interests with.  Is it not enough praise that you come home and share your promotion with a family?  It should be on the news ticker, too?  I share with my daughter and my cat, and well, I guess I don’t know any better.  But I’m sure as hell not going to stop the presses because my lab results came back negative.  Oops.  Just did.

Code Differently


Whenever I look at existing code, an automatic reaction is “what would another way be and what would it look like?  Is there some appeal to that?”  This can often bring new ways to look at the overall and reduce the work.  But I always have to make sure the appeal isn’t just because it’s different.  Boy George already used that.

Don’t Expect Me to Know What You’re Tweeting, Cuz I Don’t Read Your Wall


I saw something about a study that showed heavy Facebook users were more likely to feel unhappy with their own life/unfulfilled/envious, and it got me to thinking.

I used to say that TV, especially once there were more than 5 channels to choose from, was the beginning of the end.  I once read that “with television, people spend more time watching other — mostly fictional — people live, instead of living themselves”.  As much as I have it on myself, I try not to sit and watch unless it’s a movie I haven’t seen.  (Off topic sort of, but just yesterday I heard a psychologist say, “children have to know mommy and daddy need their time and they should just watch TV or something” — how automatic and horrendous.)

It’s what a lot of people do with Facebook, and to less extent maybe Twitter and blogs.  The latter two might play into the phenomenom I see as unique to the Web media, of needing an audience to quench the aforementioned envy.  Most people have probably already heard of Facebook addiction and the like, but I think there’s something more subtle at work, too.

Facebook creates the perfect storm for wasting time observing and comparing.  I know many of the people, thus am under similar constraints of success — same school, same profession, same geo, etc — but of course there’s going to be people posting stuff that makes my life look less glamorous.  (And like chat rooms, is any of it pumped up?)

So we read this and become envious, we spend more time reading it and we do less for ourselves, so we achieve less, etc.

In my opinion, the reality show genre is finely tuned to this.  When we watch actors, although part of us is in the fantasy of the script/plot, we don’t expect ourselves to be “them” – this is a movie, they are actors.  But when the participants become everyman who can wait in line to audition without previous qualification, without having earned it…  Show participants aren’t actors, so the audience identifies much more (“I could/should…”), but the odds are still hugely against them just because of numbers, so we become more immersed in an observer, wannabe role.

I don’t know what to make of it, but I’m just sayin.  How come I have to leave messages on cell phones so much?  How come people want to use texts, where they don’t *have* to respond?  Why do people now want to broadcast on their “wall” and expect the world to know, instead of communicating directly with the individuals who need to know?  Seems like a time saver, huh?  Well now I also have to monitor the daily flow from all the people who broadcast to me to pick out what might be information.  I’m worse off.

So I might save time when planning my own event because I can just “post” it.  BUT I have to check everyone’s posts to see what I might be interested in.  Instead doesn’t it save everyone time when each of us spends more communicating, so that everyone doesn’t have to listen in and decide for themselves whether it’s relevant to them?  Is there an ego factor at work here?  Where we want to imagine the world wants to listen to our thoughts and plans?

Do we need an audience because everyone else is famous, because we have such an immediate media, and round and round it goes

The Terminator Scenario


Machines that can build more of themselves are here.  It is a revolutionary concept to have something that, to some degree, can output itself.  We saw that in code years ago.  But this is stuff you can hold in your hand.

In answer to the detractors who ask “does the world need more plastic crap?”, I wonder if in the long run, such a system would mean less overall manufactured plastics.  Sort of a just-in-time inventory like concept.  Wouldn’t there be less mass-produced plastic?  And the supply chain for raw materials could become more streamlined, resulting in more efficiencies.

Ponderable, at least.

My Final Word on Frameworks


I would ask those who champion frameworks over some other methodology, to be open to the possibility that maybe they’ve encountered a lot of poorly designed non-framework applications.

There’s probably an unrealized consensus on the topic: people have said repeatedly in one way or another that a framework lets people do things easier or faster or there’s more people that can step in and be productive with it, as opposed to a custom-designed system.

It reminds me of the youTube I saw where the experienced telegraph operator gets his message through a couple seconds before the champion texter.

I won’t point out the implications, but they’re real, and bad.

Where to Declare


I think it’s common practice to declare (and sometimes initialize) all of a function’s local variables “at the top”, but I usually declare them close to where they’re referenced. The result of declaring at the top can lead to what I call functional striation and makes refactoring more difficult.

An example:

function innocent_looking_foo() {
    var A, B, C;
	
    do (something with A)
	
    do (something with B)
	
    do (something with C)
	
    return
}

Right from the outset, it looks like this function may not be very cohesive, but the truth is, one sees a lot of code that looks like this in the real world. Let’s say someone adds D and ‘somethingelse’ now has to be done with a few of the variables:

function innocent_looking_foo() {
    var A, B, C, D;
	
    do (something with A)
	
    do (something with B)
    do (somethingelse with B)
	
    do (something with C)

    do (something with D)
    do (somethingelse with D)
	
    return
}

or worse(?)

function innocent_looking_foo() {
    var A, B, C, D;
	
    do (something with A)
    do (something with B)
    do (something with C)
    do (something with D)

    do (somethingelse with B)
    do (somethingelse with D)
	
    return
}

In some shops, this kind of growth continues for years until no one remembers if we really need to do each thing to what. And we have people who add “do (anewthing with D)” in between A and B. Remember that the “do” pseudo statements are usually represented by more than one line of code in our function. If I am working on any part of this, I have to examine the preceding code, all the way to the top, for references to the variable I’m concerned with. there may be dozens or, lets be honest, hundreds of lines where a variable can be corrupted. There is more chance that the order of execution matters, which is bad if we can avoid it.

Now read this:

function foo() {
    var A
    do (something with A)
	
    var B
    do (something with B)
    do (somethingelse with B)
	
    var C
    do (something with C)
	
    var D
    do (anewthing with D)
    do (something with D)
    do (somethingelse with D)	
	
    return
}

This sort of aligns the code with the variables it’s doing work to, and would be easier to refactor as it gets more complex. It’s easier to see repeating patterns and turn them into callable functions.

This guideline is probably even more applicable to variable initialization, irrespective of where it’s declared. Try not to separate the initialization from the first reference.

Coding for the Long Term


“Long term” here means this, as probably most things I say, may not be applicable to those who don’t have responsibility for evolving a system with a medium or large team of developers over years. In other words, it’s what I call “enterprise”.

Programming is made up largely of a series of decisions. What’s the next step in the process? What’s the next refinement to make? What’s the interface to my software? But the most frequent decisions are made as we write the code itself. How to represent the current state so that our code can be written to achieve the desired state. Do I use an array for this? Do I write a loop here or spend the time looking for a built in function? Do I need a “default” case in this switch?

How we represent our data, or state, will constrain the style of the code — at both a macro and granular level of detail. The shape of the two together have an effect far beyond completing the task at hand. The decisions we make when coding should be influenced by this knowledge.

I’m not saying I know for sure, but when I’ve explained to others before why I emphasized a particular way of doing something, they’d say “That makes a lot of sense. I never thought of it before”. Actually, it’s usually just a discernment for which of two choices is the better overall, and why.

So I’m going to humbly share some of that. Some of it may only apply to one language, but often the concepts are transferable.

%d bloggers like this: