Author: barce

  • Why I Joined the Long Now

    I’ve been reading the book, Anathem, as well as siding with the idea that the calmest and most rational way to lead life is with the long view. I am not saying that there is no magic to being in the now. Personally, modern society is too focused on the now and the near future instead of the long view.



    That’s why I joined The Long Now Foundation.

    Anyway, as a member, I get this cool looking, stainless steel card, preferred seating at seminars, and access to their videos. Kinda sounds like a pr0n site. lol.

    I think it’s great to support an organization that has debates about biotechnology, and future upcoming crises, e.g. the environment, food and energy shortages, and historical forces.

  • The Best, Agnostic Way To Make Money In Tech

    The one thing disappointing about teaching Ruby is all the idiosyncracies with any modern scripting language.

    Very often a project will fail because of some random, idiosyncracy in a particular piece of technology. Very often, the idiosyncracy is just an excuse.

    So, what is the best, technology agnostic way to make money in tech?

    Learn one algorithm, learn it well, and then apply it to a problem that saves a lot of money.

    We live in a world of plenty bubble sorts, select sorts, and even the rare bogosorts just begging to be turned into cash and time saving quicksorts.

    The trick is learning how to do that in a business setting. More on that later. For now… learn one of these:

    Or choose your own and really, really figure out how to turn it into a business proposition.

    Why?

    Believe it or not, a lot of companies with cash have this sort of thing going on:

    while not InOrder(deck) do Shuffle(deck); #lols

    So if you could just choose one algorithm and turn it into a business proposition, which one would it be?

  • I Voted For Obama and Biden

    I’ll be having folks over to watch election coverage.

  • Codebelay Needs Bloggers

    Hey Folks,

    I’ve been following the advice Jason Calacanis laid out about blogging as close as possible. He was asked what was the sing most important step in monetizing a blog network and he answered, “Create world-class content every day for a year.”

    I confess that I have not been that religious about posting, but I’ve been posting consistently during the week. Unfortunately, I’ve started doing freelance work and don’t have as much time as I’d like.

    I want to continue to provide really interesting, quirky and beyond the bleeding edge articles about the tech world. We would be the kind of team that already has been messing around with CouchDB, Erlang, or newLisp way before others would think it was cool or profitable. We would also be the sort of team that avoids the false and gilded bullshit that creates a zombie army of fanboys or fangirls. Seriously, that stuff is lame and counter productive. Instead, we would be a little Oasis of exploring and humanizing technology.

    If you want to be:

    • part of something where you can say what you think about the tech industry
    • like to write about tech
    • want your writing to be a part of a cool community

    Then I am interested in you.

    My site has been growing since following Calacanis’ advice, but I’m realizing that I can’t do this alone.

    Please send a writing sample and why you’d like to join in the fun that is CodeBelay.

    Cheers,
    Barce

  • Redboxing with Rails: Modal Windows FTW

    There’s a great lightbox plugin for Ruby on Rails called Redbox. Unfortunately, it doesn’t work out of the box, but here’s the patch for redbox.js:

    Replace:

    Element.setTop(window_id, boxTop);
    Element.setLeft(window_id, boxLeft);

    With:

    $(window_id).style.top = boxTop + “px”;
    $(window_id).style.left = boxLeft + “px”;

    Remove or comment out:

    Element.hide(‘RB_loading’);

    Remove:

    <div id=”RB_loading”></div>
  • Where Are The Tech Jobs Right Now? In Booze and Legal

    I wrote this to the San Francisco PHP Meetup List. I am posting it here because in a month or so I know a huge portion of you will be looking for work in the tech area.

    NYSE:IRM

    Subject: Re: [php-139] Headhunters/Recruiters: Some feedback please. 🙂
    From: barce
    Date: October 31, 2008 12:06:08 PM PDT
    To: SF PHP Meetup List

    Let me comment on what’s going on.

    I will tell you about two types of layoffs, and then two types of opportunities that I am benefitting from right now.

    1. Scapegoating Pathology in Layoffs. This is where staff gets laid off to “fix” a problem, and the problems are still there. Sure, they have one less mouth to feed, but they got rid of the wrong person. How can you tell? The problem is still there. Most recruiters have a hard time filling these spots b/c turnover is high. No amount of technical skill will solve this problem. You need people skills if you’re gonna fill this role.

    2. The Invisible Hand Layoffs. The company ends up with more capital and gains more worker productivity because the invisible hand is at work.

    I would say that from the Web 2.0 companies that are laying off people it’s 50/50 . If you are really hard up for a job, then your best bet is with a company that’s done scapegoating layoffs.

    That is the opportunity #1 that I mentioned, and examples of this are meevio.com which loses a lead every 3 months and Mahalo. Calacanis fired and is now looking for workers again. Talk about scapegating!

    Opportunity #2: Litigation Support. Right now a lot of companies have a financial strategy to stay alive, and that is sue. During this economic downturn you will see companies like DTIGlobal, Iron Mountain (NYSE: IRM) and other litigation support companies do well. Iron Mountain is already doing really well. I have a client in litigation support where I do light sysadmin work.

    Get a job in these areas. Recruiters won’t know about them because they are still trying to fill jobs where there is a scapegoating pathology.

    I wish you all the best of luck,
    Barce

    PS Beer is doing well right now, too, so look for tech work in the beer industry, or hell, do what I did right out of college, sell beer. It is fun work!

  • A Quick Guide to Noobwatcher

    curl -O http://svn.collab.net/repos/svn/trunk/tools/client-side/showchange.pl
    mv showchange.pl $HOME/bin
    svn co http://codebelay.com/noobwatcher
    mkdir watched_repositories
    cd watches_repositories
    cp $HOME/noobwatcher/trunk/noobwatcher.rb .
    svn co

    Create and edit a settings.yml file. Mine looksl like this:

    path: /Users/barce/nooblive/trunk
    repo: http://www.example.com/the_repo_I_am_watching
    diffs: /Users/barce/nooblive/diffs
    twitter_email: the_twitter_email_that_notifies_you@example.com
    twitter_password: the_password_to_the_twitter_email_that_notifies_you
    twitter_recipient: your_twitter_account
    sleepseconds: 60

    Start noobwatcher:

    ./noobwatcher.rb
  • Remove ^M characters and more with repl.bash

    Hey folks, this is a goody but quicky.

    First off, respect the character encoding of a file. I don’t know how many devs out there violate this rule, but if you’re like me and Joel On Software, you’ll agree that you should respect the character encoding of a file.

    If you happen to see that your file has gotten code page 1252 aka Windows-Latin 1 in it, then you’ll have a variety of random characters like ^M or ?~@~Y or ?~@~\ or ?~@~] .

    Well, I wrote a script that removes these guys and makes sure that the file format of Unix is respected. Here it is:

    #!/bin/bash
    #
    # By: barce[a t]codebelay.com
    # ——————-
    # this script replaces microsoft special chars with plain ol’ ascii
    #
    # usage: ./repl.bash filename
    #

    # replace ^M characters
    perl -pi -e ‘s/\x{0D}\x{0A}/\x{0A}/g’ $1

    # replace garbage with single-quotes
    # ?~@~Y
    perl -pi -e ‘s/\x{E2}\x{80}\x{99}/\x{27}/g’ $1
    perl -pi -e ‘s/\x{80}\x{99}/\x{27}/g’ $1
    perl -pi -e ‘s/\x{80}\x{9c}/\x{27}/g’ $1
    perl -pi -e ‘s/\x{80}\x{9d}/\x{27}/g’ $1

    # replace garbage with asterisk
    # ?~@?
    # e280 a2
    perl -pi -e ‘s/\x{E2}\x{80}\x{A2}/\x{2A}/g’ $1

    # replace garbage quotes with plain quotes
    # start: ?~@~\
    # close: ?~@~]
    # e2 809c
    perl -pi -e ‘s/\x{E2}\x{80}\x{9C}/\x{22}/g’ $1
    perl -pi -e ‘s/\x{E2}\x{80}\x{9D}/\x{22}/g’ $1

    # replace garbage hyphens with plain hyphens
    perl -pi -e ‘s/\x{E2}\x{80}\x{93}/\x{2D}/g’ $1

    # replace garbage with ellipsis
    perl -pi -e ‘s/\x{E2}\x{80}\x{A6}/\x{2E}\x{2E}\x{2E}/g’ $1

  • Getting Around the Politics of Subversion with git

    This is the nightmare scenario. You are working with a coder who overwrites your changes in subversion. You’ve told this coder once, twice, three times, “Hey, please don’t do that. Hey, let’s talk about your changes before you commit them.”

    But this coder for some reason thinks that he or she is the gift of the gods when it comes to coding, and continues to overwrite your changes.

    This is where git comes in. If I had learned about this feature of git and the idea of accepting or rejecting changes in git sooner, I would have avoided the whole nightmare of re-comitting code and lengthy merge debates.

    Most projects you work won’t involve the worst case above. Most of the time, there will be a great developing rule that says never commit bugs into subversion. But whenever you have to re-factor code and commit each line, branching and then later merging can be an issue in subversion, and it’s slow too.

    On a project that I’m working on now the client wants only good code in svn which is great, and so I’m using git with svn. I got this idea thanks to Jakob Heuser. Thanks, Jakob!!!!

    This is where git comes in. Here’s a quick cheat sheet and it assumes you are using GitHub:

    mkdir newlispoauth
    cd newlispoauth/
    git init
    touch README
    git add README
    git commit -m ‘first commit’
    git remote add origin git@github.com:barce/newlispoauth.git
    git push origin master

    Now we have to pull in changes from subversion:

    mate .git/config

    In the config file add something that looks like this:

    [svn-remote “newlispoauth/trunk”]
      url = http://codebelay.com/newlispoauth/trunk
      fetch = :refs/remotes/newlispoauth/trunk

    Now we’re gonna fetch the subversion repo:

    git-svn fetch newlispoauth/trunk
    git checkout -b local-svn/trunk newlispoauth/trunk
    git svn rebase
    git checkout master
    git merge local-svn/trunk
    git mergetool # if there are conflicts with the README file above
    git add README # if you had to make changes with the mergetool
    git commit
    git push origin master

    Now you are working with “master” and “local-svn/trunk”.

    “master” is for your changes to share with your team on git-hub
    “local-svn/trunk” is for you and where you push changes to subversion.

    You basically pull in changes from newlispoauth/trunk and do your work in local-svn/trunk.

    Let’s put the changes in master into “newlispoauth/trunk” and commit those changes to subversion:

    git checkout local-svn/trunk # you did commit your changes in origin right?
    git merge master
    git-svn dcommit