After a great conference experience at Open Source Bridge 2014 I began to scratch my head at exactly what was it I learned?
I don’t mean about how natural and wonderful tolerance and diversity feels, as it is well-practiced at OSB, or how great it is to assemble with technical people with inquisitive minds. I mean what did I get out of the talks themselves? So I decided to write this post based on my notes, to remember what I learned and already knew, kind of like the Scarecrow in the Wizard of Oz when Oz hands him a diploma and he realizes he was a deep thinker all along.
I’m going to avoid mentioning the speaker’s names since I want to keep the emphasis on ideas, but if you want more information about any of these talks check out the sessions or session schedule at OpenSourceBridge.
1. Opening Keynote: Battling Invisible Monsters in Tech
This was a talk mostly about Impostor Syndrome where a person has high actual ability, but a low self-perception of their own ability. For me the interesting contrast was with Dunning-Kruger Effect where the traits are reversed, namely a person has high self-perceived ability and low actual ability. Somehow this effect reminds me of management.
People with Impostor Syndrome tend to push themselves too hard, take on too much and burn out.
Some useful social rules were cribbed from (and attributed to) the Hacker’s School User Manual:
- No feigning surprise.
- No “well-actually’s”.
- No backseat driving.
- No subtle sexism, racism, homophobia, etc.
2. Working Effectively with People in Government on Open Source Projects
Government people are smart and well-meaning. There are two basic types of employees: appointees and classified employees.
Appointees
- Serve at the pleasure of an elected official.
- Typically are in leadership positions like heads of department.
- Have more leeway in the work they choose to pursue.
- Generally see “opportunities” for project.
- “Front-line” of the government.
- Tend to stay longer than appointees.
- Well-defined positions, on career track.
- Less likely to get onboard a project quickly, see the “risks” in project.
- Have out-lasted many policy initiatives.
- Offer staying power if you get engaged with them.
3. Power Tuning Linux: A Case Study
This was a discussion of powertop, a tool that assists you in managing your power consumption on Linux systems.
Overall power consumption for laptops is generally 81% for the screen, 8% for the CPU. The rest is a long tail of other slivers of power consumption.
C-State = state processor uses to be idle. You want to spend more time in the highest C-State, the higher the better. Stay out of using C0, the lowest and most power-consuming C-State.
“powertop –auto-tune” will always tune your system for power. It can be dangerous if device drivers don’t support being managed for power. Ubuntu-certified devices work well for being power-tuned.
4. Get More Contributors! Lessons from the Drupal Ladder
This talk was about the experience of the Drupal Ladder in improving contributions to your open source project.
The Drupal Ladder is a hierarchy of steps, how users can move up the ladder. Essentially it’s a series of HOWTOs people can use by themselves. These HOWTOs start very simple and build on each other.
For generating interest and starting a meeting:
- See what’s already been done.
- Organize something, doesn’t need to be the greatest — it will improve.
- Recruit, recruit, recruit.
- Be responsive.
- Be the nicest guy in the room.
- Make it a positive experience for everyone.
- Use explicit invitations.
5. OAuth, IndieAuth and the Future of Authorization APIs
Earlier apps forced users to disclose their username and password, so Twitter and Flickr developed and implemented OAuth 1.0 to circumvent this problem. Most providers implement OAuth 2.0 now.
Twitter allowed other apps to post to their site. Quill is a text posting app that posts to your website if your site supports some things. Taproot is another.
For IndieAuth the idea was to reinvent as little as possible, uses HTTPS, easier than cryptography. OAuth 2.0 works on HTTPS and dropped having its own crypto from OAuth). Servers understand HTML forms so use HTML and form-encoded data for content (vs. choosing JSON or XML). Represent users by a URL. Apps are also represented by a URL. Problem with this scenario is that native apps (e.g. on smartphones) would also need some sort of public URL, even if it was a unique “About app” URL.
IndieAuth = OAuth 2.0 + Web Identity Layer (as described above)
Micropub is a vocabulary for creating and editing posts based on Microformats 2 vocabulary. IndieAuth uses authentication by OAuth 2.0 bearer tokens and form-encoded requests. The Micropub endpoint typically lives within your website or CMS (content management system).
Advantage is that all servers-side environments already support form-encoded requests. Disadvantage is that every user now has to have a website (URL).
PIP = Python Package Index.
User the package manager “pip”. To see what’s installed use “pip freeze”.
Python 3 came out in 2008, but default on most systems is still Python 2.
My Macbook AIR with OSX 10.9 (Mavericks) has Python 2.7.5.
Control-L eliminates the line from the command history in the interpreter and clears the line.
ipython is an interpreter that lets you generate notebooks of your command output.
bpython is an interpreter that has tab autocomplete and shows you command options you have as you type.
Control-r in bpython replays all your previous commands.
dir() shows you the strings in a global namespace (known to python code you entered — introspection).
python -i foo.py (lets you debug script in an interactive session)
pdb.set_trace() — places you into python debugger where you can step through lines with “s” for step or “c” for continue.
bpython auto-indents for you (python is whitespace-sensitive).
In Python 3 all strings are unicode while in Python 2 strings are UTF8.
7. How to make generics in C: An adventure in sorting
Open source library code is at https://github.com/swenson/sort
Sorting consists of two things: (1) compare two entries and (2) swap two entries.
Cleverness is knowing the order of comparing things (e.g. how good the sort is).
In C use the concatenation operator ## to make generics out of a series of #define macros. This mechanism effectively lets you reimplement C++ function templates in C.
The sort.h file (from github) is designed for speed, not for debugging — no special debug version. No library, just use the sort.h header file in your projects.
8. OpenStreetWhat? Mapping the World with Open Data
OpenStreetMap was founded in 2004 and is the “Wikipedia for Maps”. OpenStreetMap is not just maps, but also the data.
www.openstreetmap.org
Foursquare, Craigslist, Flickr all use OpenStreetMap data.
Data is stored at openstreetmap.org/wiki/servers
ODbL license for data = fine to copy, distribute, transmit and adapt, but requires attribution when used.
(c) OpenStreetMap contributors
Data comes out at openstreetmap.org/wiki/planet.osm in PBF binary format (XML also).
The XML = 400 Gigabytes = whole world of data, weighty data. Extracts are more useful than the whole huge pile.
Web tools: openstreetmap.org uses ID editor and JOSM (another editor).
These web tools edit the map data. There are also mobile editors for iOS (pushpin) and Android (Vespucci).
OSM = OpenStreetMap
OSM data consists of nodes, ways and relations.
Nodes = points in space.
Ways = collection of two or more points together (e.g. can collect into a polygon to represent a building).
Relations = group ways into higher level (e.g. a National Park that is multiple physical areas).
Notes = Communication to other contributors about issues at location note is left at.
OSM data is meant for here and now, no historical dating per se, just date when data “checked-in”.
OpenFantasyMap uses same tech to make a virtual world.
Using OSM data: Get it, Use it, Attribute it.
Leaflet = open source JavaScript plugin for displaying OSM data.
Mapbox.js = JavaScript plug-in based on Leaflet.
overpass-turbo.eu = live query of OSM data, gets data returned as GeoJSON).
Local meetup Maptime PDX event hosted at Esri has all levels of experience.
9. The Keys to Working Remotely
Communication tools: basecamp, skype, evernote, google docs, group chat
Designers: Dropbox, Invision app
Developers: Github, JSFiddle, CodePen
Pros: Flexible hours, removal of distractions = productivity
Overcommunicate:
- Do something and tell everyone.
- Send out weekly updates.
- Announce milestone achievements.
- Ask for feedback.
- Be available during work hours.
10. Make your wireless router route (or anything else) the way you want it to, with OpenWrt
OpenWrt = Build system and Linux distro
Look at OpenWrt to see list of supported devices.
Atheros radio or Raylink radio best, avoid Broadcom devices because Broadcom device drivers limited.
Can be used for data loggers, hack your router, put it in the field in a bucket and manage something remotely over WiFi (pull out data, etc.).
OpenWrt differs from ddwrt purpose. OpenWrt is for when you want to shoehorn in your own code to do something custom.
OpenWrt is a set of makefiles based on buildroot system for embedded stuff = a set of core packages and feeds (package makefiles).
OpenWrt uses makefiles (not python or bake like OpenEmbedded Linux distros).
git clone -l /home/build/openwrt-prebaked openwrt
Atheros radio will be the default if you don’t have a .config
Generic = NOR flash memory.
Netgear WNDR3800 has 128 meg RAM, end-of-lifed in 2013. Good choice to hack.
UCI = way of storing configuration information.
Try to back up the device image since there is data unique to each device radio (in SOC flash memory) for tuning parameters for the specific chip in the specific device. You can overwrite these (inadvertantly) when you flash an image.
/etc/uci-defaults = scripts meant to run once, then delete themselves, usually after a package install.
Use a serial console cable (can use it for bootloader console and can solve most problems with this).
At Frye’s look at router model number and serial number. Check OpenWrt wiki to see if supported.
History.
X10
- 1978
- Originally from Italy.
- Named after the 10th interation of project.
- 4 bit house code (A-P) allowed 16 total devices.
- 4 bit unit code per device.
- 4 bit instruction — turn EVERYTHING on or off.
- Unreliable, 70% to 80% success rate, 750 milliseconds transmit time = slow
- Limited number of units you can attach.
- 2003
- powerline X10 stuff and wireless
- moderately expensive
- software isn’t mature
- from GE – General Electric
- robust software support
- wireless only
- open standard based on Zigbee
- BEST TO DATE
- $260
- Tracks when you set controls & assumed you’re away unless its motion sensor detects you.
- “learns”
- pretty graphs online for power usage
- Shiny API
- wireless lighting station + lights
- $200
- Simple API
- mobile interface control
- Hardware = baked image, all identical
- connects to WiFi/wired network
- register with a central server
- all Javascript interface
- Mozilla side project
- Domotiga = Raspberry Pi software image at http://domotiga.nl
Object-oriented meets functional.
Runs on JVM.
Not as pure as a pure functional language.
First released in 2004.
Java interoperability
- Scala classes can use Java classes.
- Java classes can use Scala classes.
- Everything you can do in Java, you can do in Scala.
13. The 20,000 km View: How GPS works
GPS is purely passive, it can’t track you. It gives you latitude, longitude and time.
Trilateration
- satellites tell you how far you are from them
- intersection of distances from multiple GPS satellites lets you figure your location
- satellites transmit time, but speed of light delay tells you how far away it is
- satellites travel at 14,000 km/hr
- Frequency = 1.575 GHz
- uses random spreading code
- spread “power” out over a range of frequencies
- similar to CDMA-encoding for mobile voice devices
- Russia: GLONASS
- Europe: Galileo
- China: Compass
- navigation message
- 50 bit per second signal
- 30 seconds to send one complete frame of GPS navigation message
- approximate orbital parameters for all satellites
- 12.5 minutes to acquire (cold start)
- now find all visible satellites in one-tenth second (using FFT on signals trying all satellite signals to see if there)
- detailed satellite orbital info
- sent every 30 seconds
- 18 to 48 seconds to acquire (warm start)
- current ephemeris
- accurate time
- takes less than one second to lock to position
- phone gets current ephemeris from Internet and good time from network
- phones also get approximate location from cell towers
- so phones can do a hot start
- want accurate answer
- receivers record data over 24 hours
- look at where satellites actually were (from once a week updates)
- so figure out location based on acquired data and known satellite path
14. Modernizing a Stagnant Toolbox
http://make.wordpress.org
WordPress started in 2003 using tools:
- make
- ant
- jslint
- Grunt
- Phing (task config in PHP)
- JSHint
- JSValidate
- PHPUnit
- non-breaking code
- more tools beyond the JavaScript beautification and CSS beautification running
- more testing (unit tests)
- more transparency
- easy to develop
- easy to contribute
- overarching tool
- task runner
- older, but more stable (gulp is newer, but less stable)
- has big community
- has lots of modules
15. Airplanes:Sailboats::Mobile:Desktop
We didn’t understand sailboats and sailing until we invented airplanes and could understand the airflow around a wing.
So now we can understand the desktop because we have mobile devices.
We are now looking at the desktop through the lens of mobile.
Responsive design is of paramount importance for dealing with different screen sizes.
16. Grokking Git
Three keys to grokking git
- nodes and labels
- workflows
- commands
You so totally got the itty bitty things I was trying to say in my session. Seeing your words here helps me put more of that into how I want to change it for next time.
Thank you!
Hi! Glad you liked my Python session!
“Control-r in bpython replays all your previous commands.” – just to clarify, it replays all of them *except the most recent one*. And the Python 3 Unicode vs Python 2 stuff — here are the details.
Thanks!