Computing with Dabeaz

Archive

The if-return

The if-return

The other day, I came across someone questioning the following coding idiom:

def some_func(): 
    ... 
    if condition: 
        return True 
    else: 
        return False

Clearly such code must be written by a rank amateur. Why not this?

#3
March 19, 2023
Read more

Elevated - A New One Day Course!

Elevated - April 3, 2023

One of my all-time favorite “small” programming problems is the “Elevator Problem” that’s part of my Advanced Programming with Python course. In short, you’re tasked with the problem of implementing the control logic for a simple elevator. How hard could that be?

Elevators are something that you use all of the time, but maybe never think much about. Elevators are diabolical. Apparently, repeated stair climbing due to a broken elevator even inspired the creation of Rust!

Solving the elevator problem involves a little bit of everything all at once. Domain modeling, design patterns, event-driven programming, testing, simulation, different programming techniques (functional, object-oriented, logic, etc.)–it’s all there is you know where to go looking for it. Moreover, I’ve found that learning how to organize a solution has proven to be rather useful for other complex projects.

#2
March 13, 2023
Read more

New Newsletter, Parser Combinators, Courses, and More

New Newsletter, Parser Combinators, Courses, and More

David Beazley (@dabeaz)
March 4, 2023

Newsletter Migration

After a stint of newsletter hosting at TinyLetter, I’ve decided to migrate my newsletter to ButtonDown. The deal-breaker was the ability to author the newsletter using markdown–which is a real benefit for code examples and other things. Welcome!

#1
March 6, 2023
Read more
Find Computing with Dabeaz elsewhere: GitHub Twitter YouTube Mastodon