Sunday, November 17, 2019

Scope, for non tech folk

Just. Try. Make. Sense.

Scope is normally something you'd hear about in connection to a project, and the scope creeps, and scope-this and scope-that. As hard as we try, code nerds can't escape this scope crap either.

Here's an unexciting story involving scope to set the scene for the tech gibberish to follow.




Me: "Hon, where's my TODO list?"


Wife: "I left it on the Welsh Dresser"


Me: "Nope, it's not there. NOT THERE. I CAN'T FIND IT. THIS IS A CRISIS!!!"...
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.



Me "Oh, wait, FOUND IT!"



That was a story about an item, in an expected scope, how it was somewhere else, but how the meat-sack eventually found the data it was looking for. 


Below is NOT REAL CODE. Just some stuff to get the point across. But the idea stands.


The "It's on the Welsh Dresser" would look like this.

It's like, the { and } are setting boundaries. the "TODO" container is INSIDE the Welsh Dresser container, which is inside the House container, like it should be.


The crisis stage: Can't find the TODO list would now look like this.



Updating the model, you see the TODO list is on/in the floor scope. Floor is in the house scope, but it's not the same as the Welsh Dresser.

I know, I KNOW, the Welsh Dresser is actually on the floor in real life, and this whole thing is ridiculous. I put it together in 5 minutes, okay? Pretend the furniture all floats off the floor by a bit, like a bad 3d rendering.



Later on, if the dog gets hold of the TODO list.


Okay, enough, time to tie this all together. Remember: Computers are dumb. A computer, looking at welsh-dresser, would not think to look elsewhere unless programmed to do so. It's vital that the todo list is in the welsh-dresser scope for the computer to find it. Computers think, when the todo list is in the floor scope, or dog scope, it's a whole other thing. Completely different. Stupid machine.

This is why tech nerds are all, like "that data is in the wrong scope". They mean they haven't built the system smart enough to hunt elsewhere for the data the program is looking for. 

In a way, it's a good thing that the computer doesn't know how to hunt. Otherwise, we'd have a rise of the machines type deal, and very likely having to fight for our lives.








Variables, for non tech folk

Brace yourself for a walk on the wild side.

I was rabbiting on the other day about some aspect of work or another, and after a good 2 minute monologue, got asked: "But, what's a variable?" I realised: devs are like D&D nerds, Accountants or English Lit Majors: there's Jargon. To regular people we might as well be saying "hold on! Frang the meembs before you granang the pfreem".

The concept of variables is much simpler than the concept of say, Money, or Quantum supremacy, but let me have a go at confusing you with a crappy metaphor.

A variable is a holder of some information we care about, and will use later on.



This one is called "TODO"


It now contains some information

That information has changed


... and it's about as simple as that. Make no mistake, we've found ways to turn this whole thing into a huge, complicated issue, but basically, that's it: a thing we name and put stuff in, so we can use it later on.

One of the hard problems in Computer Science (tm) is "naming things". Variables are part of that. We spend a lot of time thinking about things like what to name the variable, using it, and then changing the name to something better once everything's up and running. I'm pretty bad at it. I've named variables "data", "info" "shasummink", "bleeb" etc. And I feel bad about that. But I'm over it now.

Thursday, February 7, 2019

developers! we're people too.

Let's talk about time-zones


We're living in interesting times. In the past - and I don't know whether this was just because I was younger, and not paying attention, or if it really was like that - you could get away as an engineer/programmer/developer/whatever by being good at what you did, and social skills didn't matter. You didn't have to get on well with anyone, make eye contact or talk about anything other than code and ideas.

Over time though, this has changed. Maybe it's got something to do with dev going mainstream - but the socially awkward developer stereotype is a thing of the past.

I'd say, these days, "full stack" means not only front-end-back-end-db-os capable, but also consensus-building-client-relationship-strengthening.

I'm pretty much an introvert, and if given the choice between working on some code and going out for dinner/drinks, would naturally choose the code. Of course, once you've dragged me away from the code, I enjoy the interaction, but would find it difficult to do that sort of thing every day. This social-animal stuff got me thinking. Watching.

And really: like 75% of work is social skills. Gone are the days when folks could slide pizza and a spec under a door and get code in return. Things are moving too fast to wait for exhaustive documentation. Now, we're pretty much refining as we go. As a dev, it's incredibly productive to sit right next to the designer or suit, and work with them to decide what to build, make, iterate, abandon, change.

As a lazy developer, I found out: it turns out it's often less work to negotiate or dig a bit more or try a couple of spikes and refine/shape what's going to be built than to wait for the complete spec.

If you're a dev - realise, we're people too. With all the responsibilities and obligations attached to that. Like making a bit of small-talk, or giving people the time of day to discuss an idea they've had. And to be polite in shutting it down, even if it's really stupid. Work those social muscles. Doing so gives you significant advantage.

And if you're dealing with developers, try bringing them into conversations when you're planning or thinking. Rather give them the option of dialling down their involvement. Let them prattle on about ... all those tech details. They really love the room to do that. With more and more regular people becoming devs, you'll frequently be pleasantly surprised at the humanity to be found, if you only look.

Socially correct is much more difficult to achieve than Technically correct. But everything old is new again, and the skills that got us to the top of the food chain as hairless apes are at a premium. Computer processing power, storage and baked in capabilities are cheaper than they've ever been, which means the expensive thing is the human involvement. It is only logical to get as good at the humanity part as you are at the coding part for maximum overall benefit..