• Home
  • About
    • About The Coder
    • Language List
  • Code Rules
    • #1: Clarity Trumps Everything
    • #2: Source Code is for Humans
    • #3: Don’t Ignore Warnings
    • #4: Comment As You Go
    • #5: Always Use Parentheses
    • #6: Always Define Literals
    • #7: Never Repeat Yourself
  • CS-101
  • Python-101
  • Simple Tricks
  • Guestbook

The Hard-Core Coder

~ I can't stop writing code!

The Hard-Core Coder

Tag Archives: computer programming

Managing Complexity

22 Thursday May 2014

Posted by Wyrd Smythe in Opinion

≈ Leave a comment

Tags

complex systems, complexity, complexity management, computer programming, constants, global constants, global objects, global variables, P.J. Plauger, software design, software development

Somewhere I heard someone claim that: “Programming is an exercise in managing complexity.” The word “is” makes the sentence slightly ambiguous. It could mean: “Programming is just an exercise in managing complexity,” implying that that’s all programming is. Or it could mean: “Programming is an exercise in managing complexity (in addition to other things).”

I would absolutely disagree with the first interpretation; programming is definitely more than just managing complexity. On the other hand, managing complexity is a huge aspect of programming.

Continue reading →

Python & Baseball

19 Monday May 2014

Posted by Wyrd Smythe in Fun, Python

≈ 1 Comment

Tags

baseball, character graphics, computer programming, imperative programming language, Minnesota Twins, programming language, Python code, Target Field

One of the cool things about being a carpenter is that you can make your own shelves and dog houses. One of the cool things about being a computer programmer is that you can make your own computer apps!

In an era when computers are so much a part of life, that’s a useful skill. And the nice thing about doing it yourself is that things turn out exactly as you want them. You can make things that are perfect just for you.

Case in point: using Python to create custom charts of baseball stats!

Continue reading →

Rule #3: Don’t Ignore Warnings

13 Tuesday May 2014

Posted by Wyrd Smythe in CS101

≈ 1 Comment

Tags

compiling code, computer programmer, computer programmers, computer programming, errors, Java, software development, warnings

There have been times when, working on other people’s code, one of the first things that pops up is that their code generates thousands of warnings. I’m not exaggerating the number; there have been at least two times I can recall where someone’s code set generated that many warnings. And both times, the code set wasn’t all that large (only tens of thousands of lines).

Which leads us to Rule #3: Don’t ignore warnings!

Continue reading →

Data, Text and Strings (oh, my!)

15 Tuesday Apr 2014

Posted by Wyrd Smythe in Opinion

≈ 2 Comments

Tags

computer languages, computer programming, computer science, data, data type, data types, strings, text, text file

The Strings and Text are not the same post on Musing Mortoray discusses the difference between “text” and “strings” and got me thinking. Rather than weigh down his (or her) comment section with a very long comment, I thought I’d go on a bit about it here.

I agree totally with the basic premise: that “text” and “strings” are different beasts. I also agree that text-handling depends on the text. There might be some difference in how we define text and string and thinking about how I define them turned up a lot of thoughts on the matter. This isn’t intended as an opposition post (except on one point with regard to HTML). What follows is just one programmer’s opinion.

Continue reading →

Heartbleed bug

14 Monday Apr 2014

Posted by Wyrd Smythe in Opinion

≈ Leave a comment

Tags

computer programmers, computer programming, Doug Linder, heartbeat, heartbleed bug, OpenSSL

The heartbleed bug has been in the news lately. Rightfully so; it’s a pretty big deal, at least in theory. How much damage is practically possible and how much damage may have occurred is unknown so far. But the potential security hole is enormous!

Two things really stand out about this bug: Firstly, attackers get (potentially) vast amounts of internal computer data while leaving no record. Secondly, the bug is a simple error caused by, metaphorically speaking, not looking both ways when crossing a one-way street.

Continue reading →

The Universal Answer

10 Monday Mar 2014

Posted by Wyrd Smythe in Opinion

≈ 1 Comment

Tags

computer programmer, computer programmers, computer programming, computer science, it depends, software design, The Universal Answer, Universal Answer

At some point it strikes you. For some it  happens early in Computer Science class after hearing a professor say it for the umpteenth time. For others it happens when hearing it come from their own mouths for the umpteenth time. The Universal Answer to any (and all) computer (science) question(s).

“It depends.”

Continue reading →

Too much specialization!

06 Thursday Mar 2014

Posted by Wyrd Smythe in Python, Stories

≈ Leave a comment

Tags

BOOL, code isolation, computer programming, encapsulation, software design, sub-class

To make this blog (I hope) useful, I have tips and advice and bits of advice. But the initial motivation was wanting to write about programming or software in general — topics too technical for my regular blog. In particular, I wanted a place to document past projects, ideas and personal (but sharable) thoughts about coding. I wanted a place to tell stories.

Today I have a story to tell about a programming project I’m working on.

Continue reading →

Always Use Less-Than

05 Wednesday Mar 2014

Posted by Wyrd Smythe in CS101, Opinion

≈ 4 Comments

Tags

code clarity, computer programming, greater-than, less-than, readable code

Here’s a simple tip! I can’t begin to count how many potential code bugs this has eliminated. It takes some getting used to but once you make it automatic it’s a real help in keeping code and your thinking correct.

The tip is this: when you write relational expressions, always use less-than, never use greater-than. (Less-than-or-equal is okay, too.)

Continue reading →

Naming Things

04 Tuesday Mar 2014

Posted by Wyrd Smythe in CS101

≈ 1 Comment

Tags

computer programmers, computer programming, function names, readable code, variable names

One of the things that programmers do a bazillion times during their career is come up with a name for something. Every variable, every sub-routine, every class, every method, every instance, even the program itself and all its supporting files: they all need names. In some cases the naming is obvious and easy, but in others it’s complicated. You can end up creating a big ball of mud if go about it casually.

So one thing you want to start doing is being intentional about naming things.

Continue reading →

Rule #2: Source Code is for Humans

03 Monday Mar 2014

Posted by Wyrd Smythe in CS101

≈ 4 Comments

Tags

code clarity, computer programming, readable code, variable names

When you write code, always remember Rule #2: Source code is for humans. This rule ties to Rule #1 about clarity. You’re writing for humans, so write clearly! The compiler can understand any syntactically correct ball of mud you make, but humans need all the help you can give them. Write for your human readers, not the compiler.

Continue reading →

← Older posts
Newer posts →
Follow The Hard-Core Coder on WordPress.com

The Posts

  • Tk Calculator App Extra
  • Python Prefix Calculator App
  • Python Tk Calculator App
  • Tk Windows in Python
  • Dual Numbers in Python
  • Python Decorators, more
  • Python Decorators, redux
  • Byte Multiplication Trick
  • Parsing Multipart Form Data
  • Simple Python Tricks #18

The Topics

  • Blog (4)
  • CS101 (37)
  • Fun (39)
  • Interesting (5)
  • Opinion (12)
  • Python (61)
  • Stories (15)

The Month

January 2026
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  
« Dec    

The Past

Posts

RSS Feed

Comments

RSS Feed

The Main Blog

Visit Logos con carne

Lots of wyrds... with meat!

The Author

Wyrd Smythe

Wyrd Smythe

The canonical fool on the hill watching the sunset and the rotation of the planet and thinking what he imagines are large thoughts.

View Full Profile →

Create a website or blog at WordPress.com

  • Subscribe Subscribed
    • The Hard-Core Coder
    • Already have a WordPress.com account? Log in now.
    • The Hard-Core Coder
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar