Tracepath on Lucky Star Wifi

Geekery — February 27, 2010 at 3:34 pm

ericgar@pliny ~ $ tracepath google.com
1: 192.168.0.150 (192.168.0.150) 0.371ms pmtu 1500
1: 192.168.0.1 (192.168.0.1) 3.179ms
1: 192.168.0.1 (192.168.0.1) 3.263ms
2: 68.28.121.85 (68.28.121.85) 379.922ms
3: 68.28.121.91 (68.28.121.91) 424.449ms asymm 4
4: 68.28.123.55 (68.28.123.55) 163.418ms asymm 6
5: no reply
6: 68.28.127.5 (68.28.127.5) 178.967ms
7: no reply
8: 68.28.125.69 (68.28.125.69) 129.804ms
9: sl-gw20-hrs-10-0-0.sprintlink.net (144.224.112.17) 185.336ms
10: sl-crs1-hrs-0-0-2-0.sprintlink.net (144.232.7.133) 511.799ms
11: sl-crs1-nyc-0-6-0-0.sprintlink.net (144.232.24.97) 156.634ms
[ several hops of no reply]

Mutex vs. Semaphore

Coding, Geekery — January 24, 2010 at 1:21 am

I just want to say that this sequence of blog posts by Niall Cooling is a great, detailed discussion about mutexes and semaphores.

Excerpt from “Understanding Linux Network Internals”

Coding, Geekery, Linux — December 30, 2009 at 6:24 pm

I’m currently reading Christian Benvenuti’s excellently written Understanding Linux Network Internals from O’Reilly which is helping to shore up my knowledge about how the networking stack is implemented in Linux. It’s a fantastic read so far, on course to match Linux Kernel Development by Robert Love, one of my all-time favorite books.

The following paragraph from Benvenuti’s book really made me step back and take a look at the bigger picture:

A device driver can also disable the egress queue before a transmission (to prevent the kernel from generating another transmission request on the device), and re-enable it only if there is enough free memory on the NIC; if not, the device asks for an interrupt that allows it to resume transmission at a later time. Here is an example of this logic, taken from the el3_start_xmit routine, which the drivers/net/3c509.c driver installs as its hard_start_xmit function in its net_device structure…

That passage is just brilliant. Count the occurrences of jargon there!

I guess i should read more arXiv papers to better understand how much larger the world actually is.

Please support Creative Commons

Geekery — December 29, 2009 at 9:10 pm

The Twitpic Terms of Service currently reads:

By uploading your photos to Twitpic you give Twitpic permission to use or distribute your photos on Twitpic.com or affiliated sites

All images uploaded are copyright © their respective owners

I sent the following to the generic email address publicly available, even though Twitpic a service I only use as a content consumer, not as a content producer:

From: Eric Garrido
To: support@twitpic.com
Cc:
Bcc:
Subject: Please support Creative Commons
Reply-To:

Twitpic,

Please consider supporting Creative Commons by allowing new users to
specify to license their content by default under one of the available
licenses, and specifying per-work that a CC license may or may
not apply.

Creative Commons makes for a more useful internet and should be
actively encouraged where there is a democratized content creation
arena.

Please consider making the internet even better by allowing your
users the choice of Creative Commons.

Thanks,
Eric Garrido

Creative Commons is an organization that has published a set of standardized, but evolving, copyright licenses intended to increase content sharing on the internet. As a content producer, you can choose who can use your work and in what manner. For example, this blog is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License which allows normal people to repost whatever I’ve written as long as it is used non-commercially and they cite where the content came from.

Creative Commons is basically a legal democratizer for the internet. It allows you to share the content you’ve published publicly, since all content is immediately covered under a strict copyright law unless otherwise specified.

Please think about publishing your own work (on Flickr, your blog, or elsewhere) under one of the Creative Commons licenses.

XSLT for OPML to XHTML List

Coding, Geekery, Linux — December 28, 2009 at 8:45 pm

The following some XSLT sufficient to transform an OPML file into a list, ready for you to edit and post:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0"
  xmlns:xhtml="http://www.w3.org/1999/xhtml"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  exclude-result-prefixes="xhtml xsl xs">

    <xsl:template match="body">
        <ol><xsl:text>
</xsl:text>
            <xsl:for-each select="outline">
                <li> <a href="{@htmlUrl}" ><strong><xsl:value-of select="@text" /></strong></a> - your text </li><xsl:text>
</xsl:text>
            </xsl:for-each>
        </ol>
    </xsl:template>
</xsl:stylesheet>

It isn’t 100% complete, but will get you a list of the form:

<ol>
    <li><a href="URL"><strong>Title</strong></a> - your text</li>
</ol>

In a sane interface to an operating system, you can run the following to produce transformed output, given the XSL above and an OPML file:

$ xsltproc extract.xsl google-reader-subscriptions.xml

Schneier on Terrorist Plot

Geekery — December 26, 2009 at 6:29 pm

The below is from from Schneier on the terrorist plot. Normally I don’t lift posts in their entirety, but this one is just logical:

Chechen terrorists did it in 2004. I said this in an interview with then TSA head Kip Hawley in 2007:

I don’t want to even think about how much C4 I can strap to my legs and walk through your magnetometers.

And what sort of magical thinking is behind the rumored TSA rule about keeping passengers seated during the last hour of flight? Do we really think the terrorist won’t think of blowing up their improvised explosive devices during the first hour of flight?

For years I’ve been saying this:

Only two things have made flying safer [since 9/11]: the reinforcement of cockpit doors, and the fact that passengers know now to resist hijackers.

This week, the second one worked over Detroit. Security succeeded.

Advice to future Columbia [SEAS [CompSci]] Undergrads, part one

Geekery, Personal, Random — October 29, 2009 at 9:22 pm

Following my last reflective post on advice for an aspiring technologist, I now present a laundry list of recommendations I have for a Columbia SEAS undergraduate majoring in computer science. One of the things I wished I had when I was in university was a mentor who would be able to give me this sort of practical advice and whom I’d actually take seriously. That said, part of the value of college, growing up, and life in general is stumbling upon knowledge and wisdom yourself that has been known for generations.

I wrote this over a year ago but never got around to publishing it; I’m quite frankly not sure how much Columbia has changed since graduating over two years ago, so some of this advice may be less applicable now than I can even imagine.

I guess a late addition would have to be, “Don’t eat the hot dogs in the vending machine in Lerner“.

  • Take as many 6000-level (graduate) seminars as possible. These courses are the ones all computer science students look back on as models of a quality education. These courses were the most interesting in terms of curriculum content and work required, possibly because the professors were actively interested in the material. I met a lot of people who were similarly interested in the topic, and in computer science in general, and I was enabled to interact with some very cool professors.
  • Take as many 6000-level (graduate) lectures as possible. Sometimes, a lecture-style setting will be all that is available because of enrollment. Still, these courses were challenging and rewarding.
  • Don’t wait to take silly, required courses like Physics Lab or Probability until your last semester. I guarantee from experience your life will become composed of dread going to these basic classes, knowing you only need them to graduate. They really put a downer on your finishing lap. If all else fails (which is exactly what you shouldn’t do with these courses), try to take them with friends to take the edge off.
  • Don’t take Physics 2600 unless you’re really a physics student.
    • Yes, even if you got a 5 on the AP.
    • Yes, even if you think you’re a pretty smart fellow.

    The course is hard. The people who say it’s easy either are playing to their own ego, lying, or are legitimately smart and talented (the kind who go to the bathroom and figure out an insanely hard homework problem out while doing it). Just being in a room with the latter kind of student and the professor, Norman Christ, made it somewhat worth it. The real value for me came in the realization that I’m not good at everything, that I can fail, and that I have a lot of better things I could be doing than trying to feed my own ego and living up to all expectations. The course grew me intellectually while doing very little for me academically, given that I’m not a physics god.

    That said, college in its entirety would have been a lot different had I not taken it.

  • Find a passion, if you don’t have one already. And if you think you have one, reconsider it and/or find a new one. The people that have a passion are more interesting to talk to and are more in love with life. They see the world in a slightly different tint. They become more focused, out of discipline for the subject. They strive to move forward, instead of lagging. They understand how to transform an interest into a lifestyle. I always wanted to ask the people who didn’t have “any clue” what they’re doing after college what they spent their last few years doing instead of discovering themselves. You have four short years. Use them in the search for wisdom.
  • Cry once in a while. Sometimes you might find yourself in a hard position, or in a situation that is deeper than you thought you could dig, and certainly bigger than you’d like to deal with. That’s ok. College is the last chance for you to safely and routinely do this, have dozens of people around you to help you out, and still be able just to take a step back for some perspective. It’s okay to get yourself in over your head; that’s how you define limits.

    In fact, I argue that if you don’t get yourself into these situations during college, you’re doing it wrong. You’re not pushing yourself hard enough. If you do it early on, college will be awesome by senior year.

    I distinctly remember calling home to my parents in tears over mental walls I hit. I felt horrible and pathetic at the time, but it was definitely formative and developmental for the years to come. Thank you, Mom and Dad.

  • Get out of the Upper West Side and experience the city. You’re going to Columbia University in the City of New York, not Columbia College in the City of Columbia, Missouri. Go see a show, a concert, go to that bar your friend told you about, the restaurant that got a good review in the Times. Go see and do things.

    Oh, and: Read gothamist regularly. Figure out:

    • The rules of how many blocks equals a mile (~20).
    • How to tell which way is North (odd-numbered street addresses on numbered streets).
    • The orientation and arrangement of proximate bridges (Brooklyn, Manhattan, Williamsburg, 59th St…)
    • …and main landmarks (especially helpful in The Rambles of Central Park).
    • Know the direction of the clouds (generally East-ish) or the movement of the sun (East to West)).
    • Learn more than just the Upper West Side subway stops.

    You might become a real New Yorker just yet. (And, if you do,

    • Please offer directions to strangers who are looking at maps at a street corner.
    • Pick up random pieces of litter and properly dispose of them, even if they aren’t yours.
    • Stand to the side when people are getting on or off of any form of mass transit.
    • Pay attention and be cognizant to how you are affecting other people’s environments.
    • Hold doors for strangers. Say “please” and “thank you.”
    • And for your mother’s sake, even smile at strangers every now and then.

    You might even make New York a better place to live in).

  • Live on campus. A huge part of the undergraduate community is formed simply because walking drunkenly between dorms at 5am after watching 18 episodes of Lost is not a big deal. Make sure you do well enough in academics so your parents don’t know this kind of thing happens and so they allow you to stay on campus.
  • Make friends with people who bake. This is particularly advantageous during finals for obvious reasons.
  • Take the lower-level CS courses in order. Don’t think that you’re a hot-shot and should be exempt. Some very smart people took a considerable amount of time to figure out what you should be learning when and at what pace. I was the bloke who decided I’m better than the standard curriculum and had to keep my head barely above water the whole time. It was fun and challenging, but I would have been a better, more well-rounded student had I done the normal thing. On the other hand, I wouldn’t have been able to take as many 6000-level courses and I’m definitely a better technologist for having been exposed to advanced concepts early.

    If you take the curriculum as prescribed (again, which you should), you will inevitably come to topics, sections, or projects, that you don’t enjoy or that are old news. Deal with it responsibly. Read a related, more advanced book that is highly respected. Spend a little more time on your project implementing some extra functionality or incorporating some other technology (especially if it relates to your interest; say, integrating Apache Lucene into a Advanced Programming project or using both Postgres and MySQL for your database project and comparing transactional throughput).

    You won’t have the time to do this. You’ll be too busy following the rest of my advice. My recommendation: make the time.

  • Create something amazing. This is one of the only opportunities in the rest of your life where there is such a huge concentration of interesting, curious, creative people. Use that to your advantage by creating something, something so awesome and consuming that you’ll think back about the weeks (and early mornings) you spent implementing it.
  • Get really active in an extracurricular activity.
    • Especially if it’s the ACM.
    • If not, explore your culture.
    • If not, explore your interests.
    • If not, attend events designed for amusement.
    • If not, explore someone else’s culture and reap the rewards of good, free food.

    Groups of like-minded people can be empowering. First, you have the management committee who are interested enough in a given topic to do real work to create events that will interest others. Those are good people to be around as they tend to be creative, dynamic, and even sometimes passionate. (And, if nothing else, they are useful for drinking circles). Then, you have the events themselves, which are designed to get you more information, more opportunities, and more fun, which are never bad things. I made many great contacts through the organization I was most heavily involved with and definitely got a job through it. I also ate a lot of deliciously free food.

    Being an officer in any organization is highly recommended. It shows you have the organization and the excess capacity to do something highly formalized in your free time for the betterment of others. That’s pretty powerful and commands respect.

    A word on the ACM (not the Apostolos Campus Ministry). The Association for Computing Machinery (note that it is “for” not “of”; this is a large semantic difference: I am not a piece of computing machinery) is an organization that has a lot of potential to unify all of the computer geeks on campus and get people interested in computing. It does this better some years than others. During my tenure there, we were unable to realize our vision of what the ACM should be. That is a strong regret I have to this day. That said, the officers of that organization try very hard to have good programming. Check it out.

  • But don’t overcommit to too many groups. Contributing is admirable. Being elected to a post is good for your resume, ego, and sense of self. But, trying to be 42,397 presidents at the same time is good for no-one. You may be skilled, but target that skill. No one likes to work with someone who is over-committed.
  • Get a job related to your interest. Start with getting any job with real responsibilities, where your execution impacts a larger community than just yourself, where you can show your reliability. Then, if not already, get a job aligned with your interest. (This latter recommendation, however, should be taken seriously throughout life). After that, ride the opportunities that arise from it. Being an open-source programmer and team leader was much more appealing to me (and to prospective employers) than being a theater technician (my first job at college).
  • Get a job or hobby not related to your main interest. Being a theater technician was a hell of a lot of fun and filled a lot of voids that computer science just cannot possibly fill. I still miss its physicality horribly.
  • Take some classes related to a secondary interest. Taking “Kings, Caliphs and Emperors: Images of Authority During the Crusades” was humbling, intensely interesting (the professor was a fantastic instructor), and useful at cocktail parties simply because of its name. Oh, and there were cute girls to interact with about a topic they adored.
  • See the sunrise every now and then. It’s quite beautiful. Make the number of times you see the sunrise for academic reasons equal the number of times you see the sunrise for social reasons. This is called work/life balance.
  • Go to professors’ and TAs’ office hours. I was told this constantly and I never executed on it until senior year. Then I realized: most professors and all TAs are very interested, both personally and professionally, in helping you succeed. They really will take time out of their extremely busy schedules so that you can learn. Office hours are where the student-teacher relationship is nurtured. Coincidentally, that relationship can simultaneously break down, as professors can transition to become allies and friends.
  • Don’t live in Carman freshman year. That is, unless you should have gone to a party school. Don’t be afraid of other dorms; you will make friends regardless of where you end up. I made my first real friends while I stood alone on a long line for free ice cream during orientation. (Friends, mind you, that I desperately need to call).
  • If you should have gone to a party school, don’t go to Columbia. Your spot could be filled with someone who actually is an intellectual and doesn’t just pretend to be one on his or her application.
  • Take pictures along the way. This may be the only way you remember college, as the rest of it could be filled with sleepless nights at Butler, in the lab, and on the bar at Lion’s Head.
  • Have fun. Corollary: Get out of your dorm room.
    • Next in my series of reflection: tools and technology I know today that I wish I knew about before.

Oh no. Bug reports via Twitter.

Coding, Geekery — October 29, 2009 at 8:18 pm

This was a post on the mailing list for the Moose object system for Perl:

Me on Twitter yesterday: “Had to hack Moose::Meta::Method::throw_error() to make it Carp::confess() to tell how an attribute constraint was being violated. Grrr.” and “T’was the attribute builder that did it.”.

This isn’t the first time that I’ve had to muck with throw_error() to tell what’s going on. Only showing the stack from the caller and up makes debugging harder.

Oh no. Is the Internet going to stoop to using Twitter for bug reports and requests for enhancements? I certainly hope not. 140 characters of gripe an RFE does not make.

At least he didn’t have to shorten his posts by removing random vowels.

Another reason why I like my ISP, Natural Wireless

Geekery — October 5, 2009 at 7:39 pm

download

Slashdot poll: Most Useful UNIX Tool

Geekery, Linux — September 19, 2009 at 11:09 pm

In response to the current /. poll, Most Useful UNIX Tool: I have the following from my ~/.zhistory at work:

$ for cmd in sed grep cat find telnet init exit ; do echo -n $cmd= ; grep -c “$cmd ” ~/.zhistory; done
sed=85
grep=875
cat=762
find=126
telnet=15
init=32
exit=33

Which is interesting to me. I can explain some of the counts:

  • I run ‘cat $file | (grep|sed|awk) | …’ too often out of a good/bad habit.
  • ‘exit’ is small because I’ve bound ”x’ to exit (which itself is a bad habit; I should have just started using ‘Control-D’.
  • ’ssh’ > ‘telnet’
  • I don’t have root, so ‘init’ isn’t really used, and my regex isn’t careful enough to eliminate ‘disk_init’.
  • ’sed’ is mega-useful, but is usually the second command in a pipeline. I want to start using ‘perl -pe’ more.
Older Posts »
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. | Eric Garrido