Posts tagged with programming

A newsletter about programming, design, and other related topics

My colleague Sebastian started a new side project: a newsletter about programming, design, and other related topics.

Growing the Stack is a biweekly—as in, once every two weeks—newsletter about programming, design, and other related topics. The newsletter isn't tied to any programming language or ecosystem, and it's not meant keep you up to date with all the new & shiny tools out there. It tries to bundle content that inspires. Content that triggers you to consider and try out new ideas.

Subscribe here: https://sebastiandedeyne.com/newsletter

Read more

The Future of Programming

Here's an amazing talk by "Uncle" Bob Martin where he gives an amazing overview of the history of programming and where he thinks it's headed.

How did our industry start, what paths did it take to get to where we are, and where is it going. What big problems did programmers encounter in the past? How were they solved? And how do those solutions impact our future? What mistakes have we made as a profession; and how are we going to correct them. In this talk, Uncle Bob describes the history of software, from it’s beginnings in 1948 up through the current day; and then beyond. By looking at our past trajectory, we try to plot out where our profession is headed, and what challenges we’ll face along the way.

Can't wait for his talk at this year's Laracon US.

Read more

Join thousands of developers

Every two weeks, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.

No spam. Unsubscribe anytime. You can also follow me on X.

Building Blocks

Steven Vandevelde wrote a beautifully illustrated post on some cool functional concepts.

This is a more visual approach to the topic of purely-typed functional programming. What does it mean to have a “functional” programming language? What are types? What makes a functional-programming language “pure”? These are the questions we will answer here, with a focus on simplicity.

https://icidasset.com/writings/building-blocks/

Read more

A pair of helping hands when naming things

In a new post on his blog Sebastian De Deyne shares a few services and tools he uses to help him with naming things.

One of the hardest (and sometimes frustrating) tasks in a programmer's day-to-day workload is naming things. When I have a hard time finding that perfect word, I generally wind up in one of two situations:

  • I have a plausible name in mind, but I'm not entirely satisfied with it
  • I have no idea what I could possibly name it

Luckily, there are tools out there that can be of help.

https://sebastiandedeyne.com/posts/2018/a-pair-of-helping-hands-when-naming-things

Read more

Optimize programming by optimizing for scannability

Michael D. Hill posted a great new video on his blog where he makes the case for optimizing for scannability.

As programmers trying to ship more value faster, we want to optimize first around the part of the work that we spend the most time on, and that is scanning code– formulating little, tiny questions and flipping through the code looking for the answers. We optimize for scanning by focusing our attention on sizing, grouping, and, above all else, naming.

http://geepawhill.org/optimizing-a-program-and-programming/

Read more

Language features and code properties

Josh Justice gives some solid advice on how to pick the right language for your next projects.

So to ask the question “should I use an OO or FP language (or style)” is to skip several steps. I think a better series of questions are: First, what properties would be beneficial for your application to have: concurrency? Immutability? Encapsulation? There are a lot of things you won’t know about your application at first, but you can at least know if it will be a backend app, JavaScript browser app, or native mobile app; if it will be CPU-bound or IO-bound; and if it will process data inputted by humans or automatically generated by machines. All of those factors can influence which properties you need.

Once that’s decided, the next question is, in a given language, are those properties guaranteed, easy, difficult, or not realistically achievable?

http://codingitwrong.com/2017/07/27/language-features-and-code-properties.html

Read more

The status antipattern

In a new blogpost on vemv.net the author (I couldn't find his real name) argues against using a simple status field.

Dear programmer, do you ever use the name state for your variables? Like state = 42? “Hell no, that’s a terribly generic word. Better to use the domain-specific wording the variable refers to: is_invoiced, visit_count, shopping_cart, things like that.”

Sounds reasonable. But sometimes, you have a database column called status, and use it through your codebase, right? “Yes.”

Were you aware that status and state mean basically the same thing in English? “Uhm…”

https://blog.vemv.net/the-status-antipattern-479c26c7ddf7

Read more

Why a software patch is called a patch

Bram Van Damme explains the origin of the word "patch" in context of software.

A common misconception is that a software bug is called a bug because of an actual bug – a moth – that got stuck in Harvard University’s Mark II calculator in 1947, and Grace Hopper finding it + taping it inside a logbook. ... What seems to be legit however is the history of the term software patch.

https://www.bram.us/2017/01/24/why-a-software-patch-is-called-a-patch/

Read more

Top 5 programming fonts

Eric L. Barnes of Laravel-news and dotdev fame, did a little research on the most used fonts for programming.

Everyone has their ideal development setup, and many have spent countless hours customizing it to perfectly suit their needs. Outside of a color scheme, the next typical change is the font in use and every year new fonts are introduced giving us more to choose from than ever before.

To find out what everyone is using, I asked on Twitter and Facebook and had a ton of responses. Based on the answers here is a list of the top 5 programming fonts in use today

https://laravel-news.com/2016/10/top-5-programming-fonts/

I'm a big fan of Fira Code myself. It has some nice ligatures and it just looks very good. Here it is in action in my IDE:

screen-shot-2016-10-21-at-23-56-34

Read more

Taking PHP Seriously

Keith Adams, Chief Architect at Slack, gives some background on how PHP is used at his company.

Slack uses PHP for most of its server-side application logic, which is an unusual choice these days. Why did we choose to build a new project in this language? Should you?

Most programmers who have only casually used PHP know two things about it: that it is a bad language, which they would never use if given the choice; and that some of the most extraordinarily successful projects in history use it. This is not quite a contradiction, but it should make us curious. Did Facebook, Wikipedia, Wordpress, Etsy, Baidu, Box, and more recently Slack all succeed in spite of using PHP? Would they all have been better off expressing their application in Ruby? Erlang? Haskell?

https://slack.engineering/taking-php-seriously-cf7a60065329

Read more

When are single-character variable names acceptable?

Generally I don't like to abbreviate variable names. This answer on Quora lists a few situations where an abbreviation is probably ok.

There is a simple (but unsatisfying) answer to all questions of this form: they are acceptable when they would make the code clearer.

This can happen in a few ways. The most common, as you noted, is convention: i, j, k for loop variables, x and y for coordinates, e for exceptions, f and g for functions and so on.

Another is structure. Often, the broad structure of an expression is more important than its contents. Using shorter variable names makes it easier to read at a glance. I think this is often more important than being easy to read in detail!

If a variable has a very small scope—say one or two lines at most—and it's easy to see where it comes from, having a long name is just noise.

https://www.quora.com/When-are-single-character-variable-names-acceptable/answer/Tikhon-Jelvis

Read more

Hunting for great names in programming

A great story by DHH on his quest to find good names for some functions he was working on.

One of the real delights of programming is picking great variable, method, and class names. But an even greater treat is when you can name pairs, or even whole narratives, that fit just right. And the very best of those is when you’re forced to trade off multiple forces pulling in different directions.

https://m.signalvnoise.com/hunting-for-great-names-in-programming-16f624c8fc03

Read more

Practicing YAGNI

In a new post on his blog Jason McCreary, creator of Laravel Shift, wrote down the summary of his Laracon US talk.

I consider myself a searcher. On a quest to find the Holy Grail of programming practices - that single practice which instantly levels up my skills. While I know this doesn’t exist, I do believe in a set of practices. Recently, I found one to be YAGNI.

YAGNI is a principle of eXtreme Programming - something I practice daily at work. YAGNI is an acronym for You Aren’t Gonna Need It. It states a programmer should not add functionality until deemed necessary. In theory, this seems straightforward, but few programmers practice it.

http://jason.pureconcepts.net/2016/08/practicing-yagni/

Read more

On Technical Debt: Shoveling forward

Fred Hébert on his blog:

... sooner or later, people start misinterpreting the original intent and thinking of technical debt the same way you could think about financial debt: a lever to use in order to get something now and then pay the accrued cost progressively over time. This is however not how things feel from the technical person's point of view. ... Rather than focusing on why that is wrong, I want to propose an alternative analogy to describe the reality behind technical debt.

http://ferd.ca/on-technical-debt-shoveling-forward.html

Read more

Type Wars

The venerable Uncle Bob makes the case for dynamic typing and TDD. Be sure to read the entire article to get a quick history lesson in computer languages.

The pendulum is quickly swinging towards dynamic typing. Programmers are leaving the statically typed languages like C++, Java, and C# in favor of the dynamically typed languages like Ruby and Python. And yet, the new languages that are appearing, languages like go and swift appear to be reasserting static typing? So is the stage for the next battle being set?

How will this all end?

My own prediction is that TDD is the deciding factor. You don't need static type checking if you have 100% unit test coverage. And, as we have repeatedly seen, unit test coverage close to 100% can, and is, being achieved. What's more, the benefits of that achievement are enormous.

http://blog.cleancoder.com/uncle-bob/2016/05/01/TypeWars.html

Read more