Python String Index Replace

Date Tags python

Python does not allow string to be modified via indexed assignment. For example, a = "hello"; a[1] = "x" will produce a TypeError: 'str' object does not support item assignment error. Grr!

The following one-liner stridxrep() can be used if the need ever arises:

a = "hello"

# Python doesn't allow the following:
# a[1] = "x"

# A 'string index replace' function.
stridxrep = lambda s, i, r: "".join([(s[x] if x != i else r) for x in …
more ...

Four Technologies for 2014

Date Tags software

Technology moves fast. Really fast. The following are some software technologies that I will be keeping an eye on in 2014:

  1. Docker - Brilliant container manager.
  2. Rust - Promising systems language.
  3. Emscripten - Mind-bending JavaScript compiler.
  4. D3.js - Beautiful data visualization.

While these technologies are not necessarily new, my prior experience with them is limited.

more ...

Task Lists In AsciiDoc

NOTE: An update to this post is available here.

Task lists are great! Need to do something eventually but don't have the time or motivation to do it now? Add it to a task list (think of it as procrastination management)!

When managing task lists on a computer, I prefer a file-based plain-text approach. As a software developer and avid Vim user, I have found this method to be the most flexible, reliable, and easy …

more ...

Introducing CsvPal

Date Tags python

When picking a simple but useful data format, CSV is tough to beat. However, looking through large files can be cumbersome. For this reason, I threw together CsvPal, a simple command-line utility for filtering out columns of interest. Check it out if you frequently work with large CSV files.

more ...

My Blogging Workflow


I recently switched from Blogger to this new blog (JeffComputes). Blogger is competent and feature-rich however I wanted a bit more control over my blogging platform. The blog is now powered by Pelican, a great static website generator written in Python. The theme is a customized version of fresh by Jui-Shan Liang. The hosting is provided by RamNode and their great VPS lineup. The workflow for writing a post looks like this:

  1. All of the …
more ...

Quickly Render AsciiDoc Notes

AsciiDoc is a great markup format for writing notes. In fact, almost all computer-based notes I write are in AsciiDoc; it is simple yet expressive, portable, and most importantly, grepable.

While Vim is my primary tool for viewing AsciiDoc files, looking through the raw text can leave a bit to be desired. Longing for the beautifully rendered output that only an AsciiDoc file can provide, I threw together the following simple (and ugly) Python script …

more ...

New Blog


Welcome to my new blog, JeffComputes. All previous posts have been imported from my old blog, Audiodidactic. This blog is powered by Pelican, allowing me to write content directly as Markdown or AsciiDoc files. I will post a writeup with more information about my blogging process soon. Thanks for reading!

more ...

Vim Highlight Shortcuts

Date Tags vim

Highlighting in Vim is super useful when trying to quickly see where something is being used. The following commands can be added to your vimrc file to make highlighting a breeze:

"{-- Commands to highlight the word under the cursor without moving the buffer view or cursor. --
" Case sensitive, partial match inclusive.
noremap hi :set hlsearch:let @/=''
" Case sensitive, no partial match.
noremap ho :set hlsearch:let @/='\<\>'
" Case insensitive, partial match inclusive.
noremap hu :set hlsearch …
more ...

Hi, I am Jeff Rimko!
A computer engineer and software developer in the greater Pittsburgh, Pennsylvania area.