Posts

  • Putting on a Watch »

    Things learned today:

    • How to put on a watch. It was a very productive day, I know.
      • Ocho85cincofan96 also learned how, and says “thank u!!!!!1”.
    • You don’t know JS- a series of books on Javascript, starting with one on mastery of prototypes.
    • An interesting look at how a spambot works. They will post on many random blogs to establish backlinks (although this is not very effective any more).
    • Cool analysis of Lego’s 1981 ad campaign.
    • Canned emails for almost every occasion (breaking up? look here first!)
    • Tips on keeping a change log.
    • Slick CSS icon project.
    • Sci fi book recommendations.
    • Did some research on payment models for freelance bloggers. It seems like a lot of major blogs (Buzzfeed, Ars Technica, Vice, Engadget) have full time staff writers and do not have a defined process for freelancers. They have Tips email addresses and I assume sometimes reach out based on this. Gawker pays $7/10k views which typically works out to around $50/day, Lifehacker pays by the day.
  • PowerShell »

    Things learned today:

    • Started a course on PowerShell to learn what it’s all about.
      • Functions based on cmdlets which follow a verb-noun format. The name was chosen primarily for SEO reasons.
      • Typically want to run as administrator to accomplish everything.
      • Has an extensive library of aliases, including standard Unix (ls,mkdir) accessed via ‘gal’
      • Alias naming schema is standard and can be searched via wildcards. Ex: ‘gal cl*’
      • Bash was not effective on Windows because Unix is a document oriented OS while Windows is API oriented.
        • The Unix tools (awk,sed,grep) were not helpful beyond text manipulation
      • help is pretty robust, and in V3 you can update-help.
  • Random Walk on Wikipedia »

    Things learned today:

    • A walk on Wikipedia prompted by this article on important web breakthroughs.
      • Memcached is a distributed memory object caching system. It requires both client and server side software, and seems a little similar to hybrid RAID storage to me in that it is distributed and focuses on improving performance through better storage utilization.
      • MapReduce is a programming model (like OOP or functional programming) developed by Google and used as a basis for Hadoop.
      • MongoDB essentially uses JSON documents instead of traditional SQL - this is the most popular example of a NoSQL (Not only SQL) database.
    • Figured out pagination and fixed archive links for blog.
  • Internet Problems »

    Things learned today:

    • Internet is slow. Time to figure out why.
      • MTR is a nice ping/traceroute utility to help diagnose latency issues.
      • OS X doesn’t use apt-get as a package manager. To install MTR, use brew install mtr.
      • To edit $PATH for one user, you can add to .bash_profile. Use nano or vim (not TextEdit) because of quotation problems.
      • Looking at the SonicWall AppFlow monitor, I have significant packet loss (>50%) only when AWS S3 traffic originates from local IP 192.168.168.143. Using ARP I should be able to get the MAC address and then determine the device.
      • arp 192.168.168.143 gives the MAC address. Completing a vendor lookup for this MAC address shows that the vendor is Apple. Remember to try switching networks next time this happens. It turned out to be an autobackup of photos on Mom’s iPad Air to S3.
    • Working with d3, put up a new project page at colin.im/d3experiments/.
    • Highlight code inline via Redcarpet by surrounding the code with ```.
    • A popular alternative to Jekyll is Nanoc.
  • Scraping pt. 2 - BeautifulSoup vs. Scrapy »

    Things learned today:

    _______

    HN 238

    • Authentication cheat sheet
      • Some suggestions are probably not best practice, such as enforcing password complexity and generic error messages when username/password is incorrect.
    • The HTML5 download attribute seems pretty handy.
    • Meteor.js intro, and some nice D3.js charts.
    • UIs with interface previews are awesome because users can begin doing stuff that is not reliant on the server. You can take this to different levels: Showing page layout vs. creating placeholder elements/text.
    • Cool article on National Geo maps.

    _______

    • Markdown requires multiple line breaks between bulleted lists and other text.
    • Neat tool to help prepare for technical interviews.
    • BeautifulSoup: find_all() can be removed and will function the same. Script from today below.

    from bs4 import BeautifulSoup
    import requests
    
    url="xxx"
    second="/yyy/"
    pagenum=0
    while pagenum<100:
    	finalurl=url+second+str(pagenum)
    	pagenum+=10
    	r  = requests.get(finalurl)
    	soup = BeautifulSoup(r.text)
    	content=soup.body
    	for sections in content('section'):
    		if sections.get('id')=="product-index":
    			for link in sections('a','product-thumbnail'):
    				print url+link.get('href')
    • Scrapy is another scraping tool, more fully featured than BeautifulSoup.
    • Bash aliases need to be defined in ~/.bash_profile, otherwise they are local to the session.
    • When using GitHub Pages with Jekyll, it’s easiest to pass an empty string to the –baseurl option if you want to see changes locally. Putting single quotes in a bash alias is a little rough.
    • It is easy to be abrupt but better to be understanding.
    • Basic pains are still part of the lived experience. We still feel the burn of an arrow if it shoots us in our leg, but mindfully accepting that event just avoids all the extra mental pains we add by going crazy when all we can do is our best.
subscribe via RSS