20091205

test report - embedding bzipped tar in a bash script (with uuencode)

Just a quick note on the cunning technique used in the making of tag_test.sh.

The utility's both data store and main interface is file system - which makes it easy to think of diff'ing directory trees (actual to golden) as a means to test the former.

Now, I would generate a golden test directory tree, test it manually all I want, tar-bzip2 it, and uuencode the data for pasting as an in-place redirection block (<<EOF) - which is fed to uudecode and untar in the script, of course.
And I'd also repeat this operation for every test I wanted to perform.

The resulting bash code is rather fatty, but it is totally self-contained.

tag: the bash utility's major update

Although I have properly realised the truly versatile filesystem-based tagging-enabled environment is much further away than I originally thought, I've updated my simple bash mini-utility, and it is now as useful as ever. I've even creatively wrote some tests for it.
Dowload/Clone Here

p.s. Some thoughts on the ideal filesystem interface left out for a while.

20090909

bash contexts


in your ~/.bashrc and any .bashrc's in your working directories
— for context-(cwd)-specific bash sessions!

20090804

simple (bash) file tagging utility

444 lines of pure bash tagging goodness!

Usage: tag OPTIONS FILENAME [TAG ...]
- tag FILENAME with the TAGs (if none, list current tags on FILENAME)
untag OPTIONS FILENAME [TAG ...]
- remove TAGs (or ALL if none specified) from FILENAME and list removed

(currently, you need some aliases to make this work)

This is a very raw (alpha, hehe) version of my new invention, but it works: I can tag and I can untag, and I can browse tags in my (unix) filesystem.

It has plenty of info inside, so please take your time and look at it.

Comments are much more than welcome.

p.s. In no particular order:
p.p.s. UPD!

20090719

in-cwd web serving

I've come across a simple need to serve some (static) files temporarily, for the development. I didn't find anything on the surface for this purpose, though the need may be quite common, hence the note.
The obvious choice for the server is lighttpd, and the scripting goes along the lines of lighthere.sh.

If anyone is aware of another known-good solution, please share.

20090604

programming as an evolutionary advantage

It might just happen that the ability to program – spanning informational pattern recognition through behaviour formalisation – is the next woman's skill along the line of the commonly accepted ones, in our information-driven civilisation.
The human brain processing capacity – acknowledged evolutionary advantage of our species – will most probably not increase any time soon, but rather re-utilised by outsourcing particular activities to individually programmable computer systems.
What this might do to our culture – I can only guess. Let's not live in denial then, my hopes are for good.

Some related, but practical stuff of mine coming soon.

20090531

A Guiding Tagline

I find it reasonable to label content (speaking of British of course) with a word or two in the plural — for common objects, and use the singulars just for proper names (while appropriate casing is in order). The use of 'ing'ed verbs is also welcome since it reduces the confusion from noun homonyms.
Semantic systems of the future are nowhere but in a reach.

20090529

Sinatra is really good just for one-filers.

p.s. But merb's flat app is pretty much in its diapers, and they're not fresh clean.

20090528

bash LAP: project shell history

Once chosen the way of True Laziness, your best friends are Locality and Persistence (gonna write a lot on those guys later). And there's surely no point missing opportunities of making things more local or persistent right here, right now, in your current environment. Yes, yes, the prophecy says that I'm going to unleash the power of mmTerm to save the world from the GUI hell, but why wait doing nothing?

So you may help yourself by defining a sort of bash command:

function hist() {
echo "`fc -ln -1` # `date`" >> .history
}
which allows (and encourages) you to record any significant (previous) command line to a local history log. You may also edit that ./.history yourself, of course, it's your file.

I am using this trick to keep a track of a project's command line activity of mine, and I must say, it's pretty useful while working in the project's directory (executing code generators, linking files, and stuff).

20090514

Historical Reasons vs history reasoning

I wonder, if we coding folk (just like any other sane people) don't like "Historical Reasons" mentioned anywhere in documentation, why should we put any trust in such historical reasons just anywhere else?

nested gits

I see no problem at all in nesting git repositories within a file system. Moreover, I would encourage using this technique (plus symlinks for strength) with an optional auto-commit hook (or rather agent) for parent git repositories. This will make your work more visible and persistent.

20090513

git for life, what?

I have high hopes about git, and I think it may be a workhorse for the new generation of "human output" repositories. Yes, it is still highly filesystem-based (with its regular handling), but it is clearly a step in a good direction.
What I (and quite a few people I've discovered on the net) miss in git is a command to create an "independent" commit, or rather the ability of free and convenient selection of parent commits to a forthcoming repo commit.
Probably some scripting should be in order after some additional research. Later.

p.s. I would take an extra step towards current git technology which will not adopt the above improvement as is. And that is making an additional commit after an "independent first one" with the previous (before the first commit) HEAD commit as a parent (plus the first commit as the other parent) so the working directory and git's HEAD will live in peace and harmony. Amen.

20090203

fink vs MacPorts

MacPorts! ('nuf said, fink is dead)

20090127

jobseek.whatever (this far)

I am kinda frustrated: they say "Israel has the largest number of engineers per capita" (as appears on one of the funds' sites I've visited, see below), and they are probably right, but when it comes to the web presence... [i'm cool]... well, it just doesn't feel like this.

Here's the plan:
  • Collect (and keep collecting) "jobs/careers/hiring" web resources of the companies (screw those that don't have it)
  • Wrap them with Atom/RSS streams enriched with the relevant metadata: geographic location, industry segment, etc.
    • Note that the metadata may be constant per stream or overridden per post
    • A corresponding stream directory is appropriate — organised by the same metadata accumulated
  • Aggregate all the streams into one huge pipe (this may span worldwide, not a problem since each stream is of very low volume and there's a limited number of them)
  • Provide individually metadata-filtered streams on demand
  • Watch hitech headhunters and placement companies die
For now, I'm browsing through the Venture Capital Funds in Israel and adding the funded companies of my interest to my predeliciousss with tags "israel", "jobs", "software" plus others.
I'm asking from everyone to do the same towards execution of the plan above.

Unfortunately, there are no other useful resources found, those two are close to silly jokes: d&a, Go2Web20.net - The complete Web 2.0 sites directory (you should select what you want there and then laugh).

20090125

outbrain.com rocks - everate.com shocks

Now it's final, I'm a stupid mastermind. Just take a look on outbrain.com and get a feeling on what everate.com was meant to be. I'll publish more info on my dearest stupid dead project later.

20090121

rubincubi

I've just got a repository on github for your ruby enjoyment.

It will be sorta incubator for all the tiny rubylets (rubbish?) I'm writing (but do not care to polish just yet).

Oh yes, http://github.com/costa/rubincubi/

20090120

common language

While working for my last company, I was taking care of many "production" issues, but I remember one that made me smile.
A module of language detection – which was a part of harvested user-generated web content preprocessing – has failed on some machine, and I've logged in to the machine with RDC (it must be already funny enough how and where that system worked, but anyway).
Here's what I saw...

Google is spam

Now this is Grand: have you ever seen a G's noreply email getting in the Spam folder of the same account?
I just have! Neat..

20090117

*nice* document-as-a-web-page hosting wanted

I have a domain. that's mouldwarp.com
I have a small HTML+CSS document and a couple of its copies in different formats. that's my fancy resume
I want to make it simply and reliably hosted on a subdomain. that's on resume.mouldwarp.com or something
I don't want (I really don't) too much trouble or any money spent to make this happen. money is trouble
I use Google Apps BETA;) Standard Edition for my domain and I also use Yahoo! mail&stuff. read on this below
WTF am I doing wrong? Do I want too much? Where's that button? hello, which year is this?

Google are nazis sophisticated bastards (very frustrating):
  • There is no straightforward option to upload a CSSed HTML: neither on Docs nor on Sites
    • You can, however, go through a trouble of entering HTML and CSS separately through the menu in a Doc (watch for pitfalls)
  • A published doc URL is ugly, has nothing to do with your domain, and you can't change it
  • You can't use your published doc webpage with your Google Site in any decent way (let alone simply mapping the site page to it)
  • And also a regular *FREE* user's Docs have much _more_ functionality to them than those of GApps (SE?) including some blogging engine integration
Yahoo! are more stupid and thus better: I've uploaded my resume at http://geocities.com/constantine_shapiro/ for ads, but they don't provide custom domain option for the same money, so I've made a redirection from http://resume.mouldwarp.com/ (with my GoDaddy) for the time being. does it look nice at least?
I haven't yet found an easy and free way to get what I want, so once I had enough of the current setup, I'll go checking Free Webspace and Free Web Hosting Services. any other ideas?

p.s. I know of the option of hosting all the stuff like this at home or at any other admin-accessible web server. Been there, of course, but now I strive to "minimalise" my life, i.e. to focus on things of my greatest interest, gain and joy - and routine web server administration is nowhere near them, sorry.

20090116

one used brain anyone?

Oh well, however pathetic it seems (or it is), I'm starting the professional blog of mine with a new job search saga. I'm currently located in Israel, so it may or it may not be interesting for the world how a software engineering professional* finds his next source of income down here.

*This needs a little foreword to make it a note still. I started programming at 15, that's freaking 18+ years ago (found a dad's K&R's C language book), got my first paid job in '93 (robot programming sw for kids — a solo project — if you must know), been through a lot of stuff (including a remarkably unsuccessful start-up attempt), failed to establish myself as a known cool engineering guy ("Hey, I know that guy! He's an engineer!.. and he's kinda cool"), but finally started working on it (links will follow, I swear).

Since I'm not known (or cool) to this moment, I have to put my poor brain (and some limbs) for rent once more, so here we go.

First off, I'm trying to avoid "assignment companies" (as they euphemistically put it around here, maybe a word or two on this later), so my idea is to scan bike-range companies for hopefully appropriate jobs.
A google on "israel hitech companies directory" reveals a single semi-useful listing Software Companies in Israel - I mean ONE very incomplete listing. What's going on?

Another start-up idea: a tag-based directory of businesses with their up-to-date hiring and contact information. What? It already exists? Where the fuck is it, for Jobs' sake?