Be Indirect in Your Research Questionnaire to Gain More Honesty

  • 680 words
  • 3 minutes to read
  • comments

Let’s say you are conducting research to discover programmers’ opinions about their work environments: whether they appreciate their office spaces or not. Preparing a survey with a few questions is essential. Their responses will reveal their thoughts and feelings. After working with several student groups, I’ve noticed a common mistake in questionnaire design—they are too obvious with their questions, simply asking, “How do you feel about this?” There’s a more effective approach.

Avoid Soft Line Breaks Inside a Paragraph

  • 380 words
  • 2 minutes to read
  • comments

An email, a document, a research paper, a presentation, and even a JavaDoc code block consist of paragraphs, which are “self-contained units of discourse in writing dealing with a particular point or idea.” Visually, paragraphs are supposed to be separated by a vertical space that is a bit larger than a vertical spacing between lines. To achieve this, for example, in HTML, we wrap paragraphs in the <p> tag, while in LaTeX, we use \par or just an empty line between them. However, some people insert what are calledsoft line breaks” inside paragraphs—this is a bad practice that I suggest you stay away from.

The Method Section: A Recipe for Research

  • 710 words
  • 3 minutes to read
  • comments

Every empirical research paper must have a section titled “Method” (or “Methodology,” or “Study Design”). In this section, you describe what was done to obtain the data presented in the following “Results” section. You explain the recipe, which may be replicated later by another researcher, leading to the same (or very similar) results.

Related Work: A Critical Taxonomy of Prior Art

  • 741 words
  • 4 minutes to read
  • comments

In almost any research paper, it is mandatory to have a section titled “Related Work” (or “Related Works”), where you refer to the results previously obtained by other authors or yourself. By including this section in your paper, you are not only paying respect to those who laid the foundation for your results, but also motivating and guiding your readers. Most of them may not be aware of existing studies or the importance of the problem you are solving. You must put these guys into context.

Five Ingredients of Tech Career

  • 680 words
  • 3 minutes to read
  • comments

A friend of mine recently asked me what five things he should do in order to grow his technical career in a big company. He is not interested in being a big manager, or a CEO. Rather, he wants to be a software expert, an architect, an owner of a technology, and eventually a “Fellow.” I’m not sure I was qualified to give such advice, but I did anyway. This is what I told him. Maybe this will also work for you.

Bibcop: Style Checker for BibTeX

  • 810 words
  • 4 minutes to read
  • comments

Almost every document you may write in LaTeX format will have a list of references at the end. Most likely, you will use BibTeX or BibLaTeX to print this list of references in a nicely formatted way. It is also highly probable that your .bib file will contain many typographic, stylistic, and logical mistakes. I’m fairly certain that you won’t find the time to identify and correct them. As a result, the “References” section in your paper may appear sloppy. I suggest using the bibcop package, which identifies mistakes in the .bib file and auto-fixes some of them.

Robots vs. Programmers

  • 1140 words
  • 6 minutes to read
  • comments

The release of ChatGPT 3.5 has changed everything for us programmers. Even though most of us (including me) don’t understand how it works, some of us use it more frequently than Stack Overflow, Google, and IDE built-in features. I believe this is just the beginning. Even though, only Microsoft knows what will happen next, let me try to make a humble prediction too. Below, I list what I believe robots (with Generative AI on board) will do in the future. The further into the future, the lower on the list. I tried not to repeat what GitHubNext is already saying.

Fast Tests Help Humans, Deep Tests Help Servers

  • 1208 words
  • 6 minutes to read
  • comments

In order to reveal errors of higher complexity, automated tests are turned into integration tests that involve external resources in test scenarios, instead of their mocks. While this approach improves test coverage, it slows down the entire build pipeline. This compromises the very idea of automated tests, which are meant to be a safety net and help programmers edit code safely. Splitting the tests into “fast” and “deep,” and then allowing humans to run the former while servers run the latter, might be a good solution to the problem.

The Double-Blind Review Is What Makes Decisions Fair

  • 788 words
  • 4 minutes to read
  • comments

How does your team review ideas, project proposals, or paper drafts? Imagine I’m on your team and I need a budget allocated to a new project. I craft a proposal, elucidate the motivation, assess the risks, develop a plan, and then what? Do I create a PowerPoint presentation, present to my teammates for half an hour, answer their questions for another half hour, hear their honest feedback, after which they vote and a decision is made? If this is how things are organized within your team, you risk stifling creativity and motivation.

Is Two-Step Initialization a Solution or a Symptom?

  • 2818 words
  • 15 minutes to read
  • comments

At times, it might appear practical to execute additional initialization steps for an object after its constructor has completed. However, I’m of the belief that such requirements signal underlying design flaws, such as object mutability, base class fragility, violation of layering, and unfocused abstraction. A constructor should be good enough for all scenarios. If it’s not, refactor the object.

The Hidden Dangers of Method Overloading

  • 933 words
  • 5 minutes to read
  • comments

Method overloading is a common feature in many programming languages that allows a class to have two or more methods with the same name but different parameters. According to Microsoft, method overloading is “one of the most important techniques for improving usability, productivity, and readability of reusable libraries.” I disagree. In my opinion, method overloading may lead to less readable code and more bugs, because maintaining two or more implementations under the same name gives rise to concealed semantics, which inevitably result in misunderstandings and functional defects.

A Disabled Test In Lieu of a Bug Report

  • 618 words
  • 3 minutes to read
  • comments

When you find a bug in an open-source library that you use, what do you do? You submit a GitHub issue (or whatever ticket tracking system they use). In the issue, you describe the problem in the best possible way, preferably providing a working code example that the author of the library can run locally to reproduce the bug. If you don’t provide them with an executable snippet of code, they will most likely ask you to do so, unless the bug is trivial. I suggest simplifying the workflow and giving them what they want right in a pull request: send them the bug in the form of a disabled unit test.

Just Show Up

  • 669 words
  • 3 minutes to read
  • comments

According to a study conducted by Dariusz Jemielniak in 2007, the majority of programmers perceive their own managers as highly incompetent. We don’t expect our bosses to be coding-savvy—this level of technical competence is not a requirement for an average manager. Additionally, we don’t expect them to excel in Gantt Chart wizardry or adhere strictly to risk management protocols—these are management practices that are not commonly observed in software teams today. Instead, what we do expect from them is the ability to gauge our productivity: recognizing and rewarding the best performers while taking action against those who are less motivated. Unfortunately, this is a management competence that they lack… or perhaps, fortunately.

On the Layout of Tests

  • 2367 words
  • 13 minutes to read
  • comments

I don’t know what programming language you use, but my experience of recent coding in Java, Ruby, JavaScript, PHP, Python, C++, and Rust tells me that the principle, which I will try to convince you to adhere to—is universal for all languages. It’s about the naming of test files. It may look to you like a question of low importance, but let me try to demonstrate that it’s not. How do you name your files with test classes? How many of them do you create in the src/test/java directory? Where do you place a class that is used only in a test but is not a test by itself? To most of these questions, the answer most of you would give is “Whatever!” So let’s try to find a better answer.

Smaller Try-Blocks Are Better

  • 580 words
  • 3 minutes to read
  • comments

It often happens, especially in Java, that a few places in the method are potential exception originators. Usually, we make a large method-size try block with a single catch at the bottom. We catch all the exceptions, usually even using grouping. This helps us minimize the noise, which is the exception catching. However, such large try blocks jeopardize maintainability: we are unable to provide proper error context inside catch blocks.

Don't Group Exception Catchers

  • 679 words
  • 3 minutes to read
  • comments

Sometimes we rethrow exceptions. In Java we do this more often than in other languages, because it has checked exceptions. Sometimes we must catch and rethrow a few exceptions that originated from different places in a method. Java 7 introduced grouping of different types of exceptions in a single catch block. But even without the grouping, it is possible to just catch IOException or even Exception and provide a single catch block for all types and all originators (methods that throw). Recently I realized that this is a bad practice. Here is why.

sixnines availability badge   GitHub stars