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.