Title photo
frugal technology, simple living and guerrilla large-appliance repair

Regular blog here, 'microblog' there

Many of my traditional blog post live on this site, but a great majority of my social-style posts can be found on my much-busier microbloging site at updates.passthejoe.net. It's busier because my BlogPoster "microblogging" script generates short, Twitter-style posts from the Linux or Windows (or anywhere you can run Ruby with too many Gems) command line, uploads them to the web server and send them out on my Twitter and Mastodon feeds.

I used to post to this blog via scripts and Unix/Linux utilities (curl and Unison) that helped me mirror the files locally and on the server. Since this site recently moved hosts, none of that is set up. I'm just using SFTP and SSH to write posts and manage the site.

Disqus comments are not live just yet because I'm not sure about what I'm going to do for the domain on this site. I'll probably restore the old domain at first just to have some continuity, but for now I like using the "free" domain from this site's new host, NearlyFreeSpeech.net.

Wed, 04 Apr 2018

Separating functions in programming

If you get everything you know about programming languages from Twitter, Reddit or blogs, you might miss that there are fascinating things in every programming language, old and new.

Or at least they're fascinating to me (or you) at any given moment.

My semester of programming at LA Valley College was heaving on using loops of all kinds, but we didn't get to separating things via functions or object-orientation.

I'm trying in my own code (currently Ruby) to make things more modular with blocks, some taking arguments and others not, and using classes is something I'm trying to wrap my head around.

I was reading one of my Java books (Sedgewick and Wayne's Computer Science) where the authors say in the long Chapter 2 (they're all long chapters) that separating operations into distinct functions is something programmers should strive to do.

It's the idea of organizing the code, and the ways the various languages allow (or maybe encourage you to do that) that I find fascinating at the moment.