Joel Spolsky, 18 years ago, wrote “The Joel Test: 12 Steps to Better Code“. Granted, it’s 18 years ago, but I thought it would be amusing to score my home work environment with my work work environment:
One point for each yes:
Do you use source control? 1/2 (yes, but not properly)
Can you make a build in one step? 1
Do you make daily builds? 0 – no, manually initiated
Do you have a bug database? 0 – not that I’ve ever seen
Do you fix bugs before writing new code? 0 – hahahaha
Do you have an up-to-date schedule? 0 – schedule, what’s that?
Do you have a spec? 0 – do you count screenshots in Excel as a spec?
Do programmers have quiet working conditions? 0 – unless you count needing to wear headphones
Do you use the best tools money can buy? 0 – VS2015, .NET 4.5, etc.
Do you have testers? 1
Do new candidates write code during their interview? 0 – I wasn’t.
Do you do hallway usability testing? 0
Do you use source control? 1
Can you make a build in one step? 1
Do you make daily builds? 0
Do you have a bug database? 1
Do you fix bugs before writing new code? 1/2 (I really try to practice this)
Do you have an up-to-date schedule? 0 – my clients are pretty loose about schedules…
Do you have a spec? 1 – …but they’re good about specs.
Do programmers have quiet working conditions? 1 (as in, total silence)
Do you use the best tools money can buy? 1
Do you have testers? 1 (assuming the client doing the testing counts)
Do new candidates write code during their interview? 0 – don’t interview people
Do you do hallway usability testing? 0 – unless the cats count.
It’s sad how my home environment scores considerably better than my work environment. No wonder there’s a “no telecommuting policy”, right?
I’ve been wanting to learn about SVG for a while now, and there are certainly any number of helpful websites on creating SVG drawings and animations. But I didn’t want to learn how to create static (or even animated) SVG drawings, I wanted to learn how to use SVG dynamically:
- Create, modify, and remove SVG elements dynamically.
Hook events for moving elements around, changing their attributes, etc.
Save and restore a drawing.
Discover quirks and how to work around them.
Read the rest of the article on Code Project!
Code is also on GitHub.
Object oriented programming and relational databases create a certain mental model regarding how we think about data and its context–they both are oriented around the idea that context has data. In OOP, a class has fields, thus we think of the class as the context for the data. In an RDBMS, a table has columns and again our thinking is oriented to the idea that the table is the context for the data, the columns. Whether working with fields or record columns, these entities get reduced to native types — strings, integers, date-time structures, etc. At that point, the data has lost all concept as to what context it belongs! Furthermore, thinking about context having data, while technically accurate, can actually be quite the opposite of how we, as human beings, think about data. To us, data is pretty much meaningless without some context in which to understand the data. Strangely, we’ve ignored that important point when creating programming languages and databases — instead, classes and tables, though they might be named for some context, are really nothing more than containers.
Contextual data restores the data’s knowledge of its own context by preserving the information that defines the context. This creates a bidirectional relationship between context and data. The context knows what data it contains and the data knows to what context it belongs. In this article, I explore one approach to creating this bidirectional relationship — a declarative strongly typed relational contextual system using C#. Various points of interest such as data types and context relationships (“has a”, “is a”, “related to”) are explored. Issues with such a system, such as referencing sub-contexts in different physical root-level contexts, are also discussed.
Read the full article on CodeProject.
SyncFusion has published my e-book The Kademlia Protocol. I sort of broke the mold here, typically SyncFusion e-books are around 100 pages — after formatting, this turned out to be 194 pages!
Get your free copy here!
Trump tweeted: “Our Steel and Aluminum industries (and many others) have been decimated by decades of unfair trade and bad policy with countries from around the world.”
OK, yes, foreign governments like China subsidize their industries to undercut the cost of steel manufacturing. But that’s not the whole story. We have our own politicians to blame as well. Read this (written in 2011!):
American Steal: How U.S. steelworkers lost to China
This [the weakening of the American steel industry] is occurring despite the existence of “buy American” laws governing major construction projects. The problem, as always, is Congress made compliance optional. If contractors wanted to buy American they could. If they wanted to buy from China or any other government that subsidizes its corporations, they were free to do so. Lawmakers had not been the least bit serious when they drafted the legislation.
Sadly, we have only ourselves to blame.
(image credit – a good article)
My first article of 2018 has been posted on Code Project!
It never fails to surprise me what can be gleaned from a single line of code. Gone are the days of BASIC where each line did one thing, a print statement, a gosub or goto, if-then-elseif-end if. Nowadays, a single line of code can be a chain of method calls, LINQ expressions, and operators like ?: (ternary if-else), ?. (null continuation), ?? (null coalescing) and even if-then-else implemented as extension methods.
What we’ll look at here is what can be gleaned about the implementation from just one line of code.
Read more here.