There's the potential for endless installments of "programmers not understanding how UUIDs work." Frankly, I think the fact that we represent them as human readable strings is part of the problem; sure, it's readable, but conceals the fact that it's just a large integer. Which brings us to this snippet, from Capybara James. if (!StringUtils.hasLength(uuid) […]
Since it’s election day in the US, many people are thinking about counting today. We frequently discuss counting here, and how to do it wrong, so let’s look at some code from RK. This code may not be counting votes, but whatever it’s counting, we’re not going to enjoy it: case LogMode.Row_limit: if (File.Exists(personalFolder + […]
For years, Victoria had a co-worker who "programmed by Google Search"; they didn't understand how anything worked, they simply plugged their problem into Google search and then copy/pasted and edited until they got code that worked. For this developer, I'm sure ChatGPT has been a godsend, but this code predates its wide use. It's pure […]
Horror movies, as of late, have gone to great lengths to solve the key obstacle to horror movies- cell phones. When we live in a world where help is a phone call away, it’s hard to imagine the characters not doing that. So screenwriters put them in situations where this is impossible: in Midsommar they […]
Once again, we take a look at the traditional “if (boolean) return true; else return false;” pattern. But today’s, from RJ, offers us a bonus twist. public override bool IsValid { get { if (!base.IsValid) return false; return true; } } As promised, this is a useless conditional. return base.IsValid would do the job just […]
Quality control is an important business function for any company. When your company is shipping devices with safety concerns, it's even more important. In some industries, a quality control failure is bound to be national headlines. When the quality control software tool stopped working, everyone panicked. At which point, GRH stepped in. Now, we've discussed […]
As a general rule, if you’re using an RDBMS and can solve your problem using SQL, you should solve your problem using SQL. It’s how we avoid doing joins or sorts in our application code, which is always a good thing. But this is a general rule. And Jasmine sends us one where solving the […]
When processing HTTP requests, you frequently need to check the parameters which were sent along with that request. Those parameters are generally passed as stringly-typed key/value pairs. None of this is news to anyone. What is news, however, is how Brodey's co-worker indexed the key/value pairs. For i As Integer = 0 To (Request.Params().Count – […]
When SC got hired, the manager said “unit testing is very important to us, and we have 100% test coverage.” Well, that didn’t sound terrible, and SC was excited to see what kind of practices they used to keep them at that high coverage. [Test] public void a_definition() { Assert.True(new TypeExpectations<IndexViewModel>() .DerivesFrom<object>() .IsConcreteClass() .IsSealed() .HasDefaultConstructor() […]
Damiano's company had more work than staff, and opted to hire a subcontractor. When hiring on a subcontractor, you could look for all sorts of things. Does their portfolio contain work similar to what you're asking them to do? What's the average experience of their team? What are the agreed upon code quality standards for […]