12 years Ago

Is Encodo a .NET/C# company?

Published by marco on in Miscellaneous

Encodo has never been about maintaining or establishing a monoculture in either operating system, programming language or IDE. Pragmatism drives our technology and environment choices.[1]

Choosing technology

Each project we work on has different requirements and we choose the tools and technologies that fit best. A good fit involves considering:

  • What exists in the project already?
  • How much work needs to be done?
  • What future directions could the project take?
  • How maintainable is the... [More]

John Oliver on the estate tax

Published by marco on in Finance & Economy

John Oliver’s new show on HBO is what some of us have always wanted the Daily Show to be. Oliver doesn’t self-censor, he doesn’t do pandering interviews and he does really, really in-depth segments. He did one recently on inequality.

“The federal estate tax does not apply to 99.4% of all farm estates. It also doesn’t apply to 99.86% of anyone’s estate. Basically, if you are not comfortable calling your pile of shit an “estate”, the estate tax probably doesn’t fucking apply to you.”

Watch the... [More]

Should you return null or an empty list?

Published by marco on in Programming

I’ve seen a bunch of articles addressing this topic of late, so I’ve decided to weigh in.

The reason we frown on returning null from a method that returns a list or sequence is that we want to be able to freely use these sequences or lists with in a functional manner.

It seems to me that the proponents of “no nulls” are generally those who have a functional language at their disposal and the antagonists do not. In functional languages, we almost always return sequences instead of lists or... [More]

Optimizing data access for high-latency networks: part IV

Published by marco on in Programming

 In the previous two articles, we managed to reduce the number of queries executed when opening the calendar of Encodo’s time-tracking product Punchclock from one very slow query per person to a single very fast query.

Because we’re talking about latency in these articles, we’d also like to clear away a few other queries that aren’t related to time entries but are still wasting time.

Lazy-loading unneeded values

In particular, the queries that “Load values” for person objects look quite... [More]

The BBC presents: The future of news

Published by marco on in Design

 Screen-shot of articleThe article Man sectioned over Manchester Airport plane bomb hoax (BBC) was forwarded to me purportedly for its content.

That content? They closed an entire airport for a bomb hoax.

But something else caught my eye: the sheer impenetrability of the presentation. I took a screenshot of the whole article, shown to the right. Can you tell where the article is hiding?

I’m going to ignore the British news-authoring penchant for crash blossoms.[1] Also, I’m going to assume that using “section” as a verb... [More]

World Cup 2014 Finals finally over

Published by marco on in Sports

Ah, now I can have my life back.[1]

Why are you[2] watching?

I honestly don’t know what comes over me when the Soccer World Cup or the European Championship is on. I never watch club football. I know some of the teams and know where some of the players play, but that’s it. I know many names, but don’t follow assiduously enough to even halfway qualify as a fan.

I am strongly critical of FIFA and their politics, corruption and influence. It’s probably a giant waste of money. At least some of the... [More]

Doing something worthwhile vs. working for a living

Published by marco on in Quotes

“We must do away with the absolutely specious notion that everybody has to earn a living. It is a fact today that one in ten thousand of us can make a technological breakthrough capable of supporting all the rest. The youth of today are absolutely right in recognizing this nonsense of earning a living. We keep inventing jobs because of this false idea that everybody has to be employed at some kind of drudgery because, according to Malthusian-Darwinian theory, he must justify his right to exist.... [More]”
Buckminster Fuller on March 30th, 1970 (The New York Magazine)

Optimizing data access for high-latency networks: part III

Published by marco on in Programming

 In the previous article, we partially addressed a performance problem in the calendar of Encodo’s time-tracking product, Punchclock. While we managed to drastically reduce the amount of time taken by each query (>95% time saved), we were still executing more queries than strictly necessary.

The query that we’re trying to optimized further is shown below.

var people =
  Session.GetList<Person>().
  Where(p => Session.GetCount(p.TimeEntries.Query) > 0).
  ToList();

This query executes one... [More]

World Cup 2014 group phase

Published by marco on in Sports

Brazil vs. Croatia (3–1)
Brazil took a little while to get going but showed flashes of brilliance. They got lucky that the momentum didn’t go the other way before getting some fortuitous calls. Brazil almost always gets the benefit of calls. I’m on fence as to whether it’s an in-built, explicit prejudice, an unconscious tendency on the part of referees in awe of their reputation or just a natural outgrowth of their playing so well.
Mexico vs. Cameroon (1–0)
Can’t remember. I think Mexico... [More]

Optimizing data access for high-latency networks II

Published by marco on in Programming

 In the previous article, we discussed a performance problem in the calendar of Encodo’s time-tracking product, Punchclock.

Instead of guessing at the problem, we profiled the application using the database-statistics window available to all Quino applications.[1] We quickly discovered that most of the slowdown stems from the relatively innocuous line of code shown below.

var people = 
  Session.GetList<Person>().
  Where(p => p.TimeEntries.Any()).
  ToList();

First things first: what does... [More]

Optimizing data access for high-latency networks: part I

Published by marco on in Programming

 Punchclock is Encodo’s time-tracking and invoicing tool. It includes a calendar to show time entries (shown to the left). Since the very first versions, it hasn’t opened very quickly. It was fast enough for most users, but those who worked with Punchclock over the WAN through our VPN have reported that it often takes many seconds to open the calendar. So we have a very useful tool that is not often used because of how slowly it opens.

That the calendar opens slowly in a local network and even... [More]

Questions to consider when designing APIs: Part II

Published by marco on in Programming

In the previous article, we listed a lot of questions that you should continuously ask yourself when you’re writing code. Even when you think you’re not designing anything, you’re actually making decisions that will affect either other team members or future versions of you.

In particular, we’d like to think about how we can reconcile a development process that involves asking so many questions and taking so many facets into consideration with YAGNI.

Designing != Implementing

The implication... [More]

Riding the wave

Published by marco on in Finance & Economy

When we talk about getting real about the Internet economy, we talk about acknowledging that there is real value there. And when we talk about valuation, we think we are talking about some measure of that—real value. The word “value” is built right into the word, so that must be what it means, right?

But what do we mean when we say “real value”? What kind of value or values? And, more importantly, value to whom? Is there only positive value? Or is there a negative component? Which part is... [More]

On encouraging a prescriptivist to use more hyphens

Published by marco on in Miscellaneous

The title sounds like a self-post on Writing Prompts, but it describes quite accurately what I attempted to do when formulating a response to the essay Nobody. Understands. Punctuation. by Peter Welch (Still Drinking).

Below is the text of my mail to him.

I’ve read a few of your essays since you made such a splash with what you are probably aware is your making-it-to-the-big-time essay Programming Sucks by Peter Welch (Still Drinking) and I enjoyed the last one propounding descriptivism over prescriptivism.

A descriptivist is ordinarily well-shielded... [More]

Questions to consider when designing APIs: Part I

Published by marco on in Programming

A big part of an agile programmer’s job is API design. In an agile project, the architecture is defined from on high only in broad strokes, leaving the fine details of component design up to the implementer. Even in projects that are specified in much more detail, implementers will still find themselves in situations where they have to design something.

This means that programmers in an agile team have to be capable of weighing the pros and cons of various approaches in order to avoid causing... [More]

Dealing with improper disposal in WCF clients

Published by marco on in Programming

There’s an old problem in generated WCF clients in which the Dispose() method calls Close() on the client irrespective of whether there was a fault. If there was a fault, then the method should call Abort() instead. Failure to do so causes another exception, which masks the original exception. Client code will see the subsequent fault rather than the original one. A developer running the code in debug mode will have be misled as to what really happened.

You can see WCF Clients and the “Broken”... [More] by David Barrett

REST API Status codes (400 vs. 500)

Published by marco on in Programming

In a project that we’re working on, we’re consuming REST APIs delivered by services built by another team working for the same customer. We had a discussion about what were appropriate error codes to return for various situations. The discussion boiled down to: should a service return a 500 error code or a 400 error code when a request cannot be processed?

I took a quick look at the documentation for a couple of the larger REST API providers and they are using the 500 code only for... [More]

Movie recommendations #1

Published by marco on in Movies

I’ve been asked for movie recommendations often enough of late that I thought I’d put together a bit of a summary of the mini-reviews I’ve made over the years.

The following list is not comprehensive nor does it necessarily comprise my favorite movies, though many favorites are here. I made the list with a particular couple of friends in mind and tailored it to include the movies I thought they might find interesting but had most likely not heard of or hadn’t yet seen. I also only chose movies... [More]

OpenBSD takes on OpenSSL

Published by marco on in Technology & Engineering

 Much of the Internet has been affected by the Heartbleed (Wikipedia) vulnerability in the widely used OpenSSL server-side software. The bug effectively allows anyone to collect random data from the memory of machines running the affected software, which was about 60% of encrypted sites worldwide. A massive cleanup effort ensued, but the vulnerability has been in the software for two years, so there’s no telling how much information was stolen in the interim.

The OpenSSL software is used not only to... [More]

Mixing your own SQL into Quino queries: part 2 of 2

Published by marco on in Programming

In the first installment, we covered the basics of mixing custom SQL with ORM-generated queries. We also took a look at a solution that uses direct ADO database access to perform arbitrarily complex queries.

In this installment, we will see more elegant techniques that make use of the CustomCommandText property of Quino queries. We’ll approach the desired solution in steps, proceeding from attempt #1 – attempt #5.

tl;dr: Skip to attempt #5 to see the final result without learning why it’s... [More]

Mixing your own SQL into Quino queries: part 1 of 2

Published by marco on in Programming

The Quino ORM[1] manages all CrUD—Create, Update, Delete—operations for your application. This basic behavior is generally more than enough for standard user interfaces. When a user works with a single object in a window and saves it, there really isn’t that much to optimize.

Modeled methods

A more complex editing process may include several objects at once and perhaps trigger events that create additional auditing objects. Even in these cases, there are still only a handful of save... [More]

Capsule Movie Reviews Vol.2014.3

Published by marco on in Movies

Gravity (2013) — 6/10
I can only say what I thought of this movie based on the way that I saw it: in HD on a conventional screen at home. I can imagine that the experience was very different in 3D and on a giant screen with a kick-ass sound system. The only downside I can think of is that if the sound-leveling was the same in the theater, it would have been an ear-blistering experience. If you set the volume high enough to hear the occasional radio whispers, many other parts of the movie... [More]

Criminal Justice in the U.S.

Published by marco on in Public Policy & Politics

The article Theater of Justice by Molly Crabapple (VICE) is an article by an artist who also occasionally does courtroom sketches.

She tells of Cecily McMillan, who was beaten into a seizure by police offers and who two years later stands trial for assaulting a police officer, facing seven years in prison. The officer’s record of having beaten other suspects was deemed inadmissable.

Or there is the other recent case of a black woman who tried to stand her ground, as others have successfully done. She fired a warning... [More]

Big data ignores lessons learned

Published by marco on in Science & Nature

The article Big data: are we making a big mistake? (Financial Times) bursts the bubble of the wide-eyed, overconfident and underinformed techies who think that their giant piles of data will fix everything. The article contains many interesting examples, some of which are touched on in the conclusion, cited below:

“Uncanny accuracy is easy to overrate if we simply ignore false positives, […] The claim that causation has been “knocked off its pedestal” is fine if we are making predictions in a stable... [More]”

Russophobia: the Lunatics are at the Helm

Published by marco on in Public Policy & Politics

I am so tired of hearing of scintillatingly smart people who can’t seem to ever say anything that is even tangentially well-informed. We knew that the Bush administration was a booby-hatch full of cantankerous old farts who hadn’t been right about anything or even had an original thought since before it became illegal to beat your wife and black people, not necessarily in that order. That doesn’t excuse them in any way at all, but they didn’t even really have a veneer of intelligentsia to them.... [More]

Java 8

Published by marco on in Programming

 This article discusses and compares the initial version of Java 8 and C# 4.5.1. I have not used Java 8 and I have not tested that any of the examples—Java or C#—even compile, but they should be pretty close to valid.

Java 8 has finally been released and—drum roll, please—it has closures/lambdas, as promised! I would be greeting this as champagne-cork–popping news if I were still a Java programmer.[1] As an ex-Java developer, I greet this news more with an ambivalent shrug than with any... [More]

Where did Marco go on Google+?

Published by marco on in Technology & Engineering

If anyone’s wondering why they can’t find me on Google+ anymore, it’s because recent changes led to my YouTube account no longer functioning as I wanted it to.

What was the problem?

Essentially, my situation was like this:

  • I have an ancient YouTube account associated with my only gmail address
  • Until recently, this YouTube account was not associated with Google+
  • A while back, I created a Google+ account for the same gmail address
  • Until recently, this Google+ account was not associated with... [More]

Published by marco on in WebCore

Since almost the beginning, earthli has supported themes that let the user choose the basic color scheme for the site. In the early days of the web, it was a cool way of playing with CSS. It also kept your coding honest because you had to stick to a style guide instead of just throwing in styles all over the place.

In recent years, the themes started to look a bit dated. With the introduction of a completely new base layout, most of the themes looked bad and skewed instead of simply dated.

A... [More]

Quino: efficiency, hinting and local sorting

Published by marco on in Programming

In Quino: partially-mapped queries we took a look at how Quino seamlessly maps as much as possible to the database, while handling unmappable query components locally as efficiently as possible.

Correctness is more important than efficiency

As efficiently as possible can be a bit of a weasel statement. We saw that partial application of restrictions could significantly reduce the data returned. And we saw that efficient handling of that returned data could minimize the impact on both... [More]