Author: barce

  • 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
  • The Clean Slate

    One of the great things about America is that you can start all over again by moving to a new town, or by just simply doing the thing you are afraid to do.

    I had the offer letter in my hand. It was for a profitable company that just secured enough VC to outlast the Great Depression, The Sequel. Experience told me that this was the most sensible thing to do, so I signed the offer letter. I would be making more money that any previous job I had, and the position would be this cushy middle-ware coder.

    But something nagged at me. So much of life is an illusion. For some reason, I felt that the secure, money-maker of a job was an illusion. I also felt that I was taking myself away from the game of business where I would right all the wrongs done to me. I am still aching freshly from some wounds that people gave me; people who dishonored me by claiming I was a coder of poor quality when just weeks before they were saying I was the best of coders. I worked weekends for these people when none of the other developers would. I volunteered the most for being on-call, and they dishonor me.

    Anyway, dear Readers, you in the industry know who these dishonorable people are, and because I decided to take the harder road of freedom, I am free to speak of them here. Why? Because in a world where faint praise is damning, there is no amicability in that. Because I will never, ever use the dishonorable as a reference. I will only use honorable references from honorable men, if I have to, but I really just want to free myself from references altogether. I will hack things out project by project and by the skin of my teeth, and be free.

    I turned the offer of security down.

    I chose total personal freedom.

    The crumb of freedom tastes better than the banquet of slaves.

    I have been learning so much in the situations that I’ve been in these past few days.

    My code is my reference.

    What would you choose? Security or Freedom?

  • How the FBI Would Have Tracked Palin’s Hacker If He Were L33ter

    It’s been a few weeks since Palin’s “hacker,” David Kernell, got caught because he left a reference to ctunnel.com in the screenshots of Palin’s email.

    Enjoy Jail, Punk!

    What if David Kernell was able to remove the references to ctunnel.com? What would the FBI have to do to catch him? And how would a would-be hacker avoid detection?

    1. The FBI would have to obtain records from Yahoo and 4chan, and these records would hopefully reveal the IP addresse(s) that accessed Palin’s account.
    2. The FBI would also have to search data retrieved from a descendant of Carnivore, a wiretapping software used for the Internet c. 2001. Such data could reveal the MAC address of the hacker. The MAC address would lead to the place of purchase for David’s network card.

    Even if David Kernell photoshopped ctunnel.com from the screenshots of Palin’s email, the FBI could still have catched him in two ways:

    1. The IP address at Yahoo or through Carnivore-like software would have led the FBI to ctunnel and then to David’s IP address.
    2. The MAC address gotten through Carnivore-like software at David’s ISP (which is not really likely) would have led the FBI to the store at which David’s computer was purchased. Something like “ping davids_IP && arp -a” would have to be run on a LAN level.

    So how else could David have avoided detection?

    1) He could have chained proxy servers.
    2) He could have used a combination of p2p networks like the ones used for downloading movies and music to get to the web pages.

    But even then, the FBI would still be able to catch him.

    The FBI could still log name server look ups, the very techology that allows your computer to see www.fbi.gov as 64.212.100.43. If a log of name server look ups matched the time stamps of when the hacked pages were accessed, then the FBI would have a strong reason to believe that the hacker was using the ISP that provided the name server lookup, and from there get to David.

    Okay, okay. Let’s say that David disabled name server lookups. Could the FBI catch him if he went as far as that?

    If somehow his MAC address got leaked that would lead right to whoever purchased his computer’s network card. If he paid cash for his network card on the black market, or Craig’s List, then the FBI would be on a wild goose chase.

    I think if he took all the precautions above, the FBI would be at a total loss for tracking Palin’s Hacker if he were l33ter.

    Thoughts?

  • Reflections on the Last Recession: 2002-2005

    I remember the last recession clearly. I arrived back home after living in Italy to cheap rents and a San Francisco that felt very empty. I found a huge room in Cole Valley with a hot tub and garden for $600 a month. I thought that was expensive at the time in the Winter of 2002.

    Here’s the run down:

    • 2002 – I spent this year re-adjusting to being back in San Francisco. I felt alienated. When I arrived to Italy, the first person to greet me was a beautiful woman who said, “Good Evening, can I help you? Are you lost?” When I came back to the good ol’ US of A, and greeted the first person I saw, her response was a rude, “Who are you? Do I know you?”
    • 2003 – I cashed out a good chunk of my savings. I spent a year learning ancient Greek and studying philosophy. What I got out of that study was how beautiful and enough philosophy is, and that at the same time the world is so indifferent to such beauty. I really wanted to be some gal’s boyfriend at this time because I could use a good portion of my free time to help her out. I hit a low point employment-wise when I was stacking candles at Planet Weavers. When the money ran out, I barely had enough to eat. However, thanks to a few good people, I started getting odds and ends tech jobs. The best thing is that I found out my natural work and sleep schedule. My body likes to work at 9am and sleep at 1am.
    • 2004 – I started to see more and more tech jobs. I began to see the blossoming of a social life I never thought possible. I went out on a lot of dates this year, and I’m still friends with the women I’ve dated from this time.
    • 2005 – I really feel that this year was the worst and the best. I really believed in the whole Web 2.0 thing, but I found that caused a lot of conflict with some of the folks I was working with. I learned that if you’re gonna go cutting edge, it’s gonna shake your world. I lost a lot of old friends because of Web 2.0 ambitions, but I gained a few new ones. It was worth it.

    Although I had the chance to take a full-time job in 2003, I stayed lean and focused on learning Web 2.0 technology until I could work for the Web 2.0 site that I wanted to in 2006.

    It’s strange looking back on those times. I know I’ve changed a lot, but *some* of the very people who have helped me have not. I have tried to help these in whatever way I can, but they all just seem stuck. Then there are others who have helped me and I have helped and they’re not stuck. They’re thriving. Will they continue to thrive?

    Take aways: Use an economic down-turn as an opportunity to find out who you really are. I’ve worked with so many people who were just in it for the money and not real geeks at heart. Steer clear of these people, because they are toxic from getting involved with the wrong technologies for the wrong reasons.