Recently a friend and fellow programmer asked me how I learn a new language or platform. I answered that I do it with specific task in mind. Basically, I bumble along googling every little step until I complete my task. But I forgot to tell her about the pitfall of this method…
Vienna in the 1840s was a scary time and place to give birth. From 1840 to 1846, 7% of women who gave birth at the Vienna General Hospital died of a postpartum infection called childbed fever. One doctor at the hospital, Ignaz Semmelweis, made it his mission to stop the disease. His work saved hundreds of lives, contributed to the development of medical hygiene — and can teach us a few things about debugging.
One day in 2010, I flipped through the latest issue of National Geographic and counted how many women and how many men were mentioned by name. It was actually an article about women in a particular country that sparked my curiosity. The unusually many women in that article (it turned out to be 8 women and 4 men) stood out in contrast with the rest of the magazine. The other feature articles (none of which were purportedly about men) mentioned in total 54 men and 12 women.
If you were to metaphorically represent media depictions of Detroit as photos of individual people, most would be either a mugshot of a scowling black man (the personification of crime lurking among abandoned buildings) or a photo looking down on big sad brown eyes like one of those “save the children” ads (the personification of neediness and white man’s burden).
The Allied Media Conference, held in Detroit for more than half of its 18 years, generates a powerful counter-narrative and counter-imagery about Detroit. The AMC is very much by and about Detroit (about a third of its participants are from Detroit). It’s also a place for wider communities of people of color, queer and trans, disabled, low-income, and other identities and issues, to come together and organize around common principles.
Project Ruori, a pseudorandomly generated collective of humans and machines, sent several delegates to this year’s Asheville electro-music festival. We came prepared with knowledge gained from last year, for example: if it smokes, unplug it. The human delegates — Steve Mokris, Melissa Egan, and Jaymie Strecker — now present their report of this year’s proceedings.
Before 1878, few people knew what a galloping horse looked like in slow motion. That changed when Eadweard Muybridge, witnessed by the local press, used a clever apparatus to take a series of photographs as a horse galloped by. The result was “Sallie Gardner at a Gallop”, a.k.a. “The Horse in Motion”. Back then, you could watch the series of photographs as a movie on a zoopraxiscope. Today, you can watch it in an online video.
I first became aware of this piece of history when my co-worker Karl Henkel made a colorful rendition of related photographs, “Annie G. Galloping” (pictured at right). I looked up the story behind these photographs, but it didn’t answer the question I was wondering about: Who were the guys riding the horses?
You’re in a roomful of computer scientists. Most of them are women. All of them are there to promote women in computing.
What do you talk about?
What don’t you talk about?
What are you accomplishing?
What aren’t you accomplishing?
These are the questions I’ve been asking about the recent Ohio Celebration of Women in Computing (OCWiC).
LLVM is the compiler infrastructure that underlies Clang, Vuo, and many other projects. It’s a set of libraries to help you build compilers (and more). Among other things, LLVM provides a C++ API for generating LLVM Intermediate Representation (LLVM IR) code. LLVM IR is an assembly language for a hypothetical computer. LLVM IR code can be either interpreted or compiled down to native code.
So LLVM provides this C++ API for generating LLVM IR code — but it doesn’t stop there. LLVM can also generate C++ code that generates LLVM IR code. In other words, LLVM can literally write part of your compiler for you!
Have you tried Clang yet? Clang is an open-source compiler, under active development, that aims to replace GCC for compiling C, C++, and Objective-C. Compared to GCC, Clang is faster, while generating comparably fast code, and prints more useful error messages.
Clang is also better for developers who want to compile code programmatically. Unlike GCC, Clang is designed to be both a tool and an API. That makes Clang’s source code easier to understand and reuse. And, for those of us working on projects incompatible with GCC’s GPL license, it’s good to know that Clang is distributed under the BSD license.
Kosada is working on a cool new project that’s built on top of Clang and its underlying framework, LLVM. While using Clang for this project, I’ve been pleased to see how simple it is to write code that builds other code. Simple in retrospect, anyway! The code I wrote turned out to be simple, but it took lots of digging through the Clang source code to figure out what to write. So here’s my first contribution to the Clang community: two examples of using the Clang API to build code programmatically.
A quick tip for Views newbies…
In Views 2.x (Drupal 6.x), if you want to add or remove fields in a Views display, and you want that to override the Defaults display instead of updating it:
- In the display, click the Rearrange button next to Fields.
- Click Override, then Update.
- Add or remove any fields you want.
Let me introduce you to the best language you’ve never heard of: Objectivist-C.
Although academic computer scientists have generally dismissed Objectivist-C, it has a zealous following among self-taught programmers and college sophomores.
Objectivist-C was invented by Russian-American programmer Ope Rand. Based on the principle of rational self-interest, Objectivist-C was influenced by Aristotle’s laws of logic and Smalltalk. In an unorthodox move, Rand first wrote about the principles of Objectivist-C in bestselling novels, and only later set them down in non-fiction.
Here’s what you need to know to program in Objectivist-C.
Concrete example: One of our consulting clients was using a synchronous webservice for their retail store locator. We needed to create a form where store owners could change whether they’re listed in the store locator. When a store owner submits the form, should she have to wait around while our site sends her change to the store locator webservice? We didn’t think so. So we decided to use Drupal’s Queue API, which lets us save up all the store owners’ changes and send them to the webservice in a batch.
Here’s a simple example of adding items to a queue in a form submit handler and processing them in the next cron run.
“You should read this book,” a friend told me. “It says that women don’t make as much as men because they don’t negotiate their salaries.”
The book was Women Don’t Ask: Negotiation and the Gender Divide, by Linda Babcock and Sara Laschever, published in 2003. The notion that “women don’t make as much as men because they don’t negotiate their salaries”, it turns out, is a myth — a myth spun from the sloppy science and sexist assumptions of Women Don’t Ask.
When you’re getting started with iOS development, it’s hard to figure out those first steps. What developer tools do you need? What are some good tutorials to start with? Where to begin delving into Apple’s thousands of pages of documentation?
That’s why I created iOS Development on 1 Page — a not-overwhelming guide for iOS newbies.
Is there any essential info about iOS development that should be added to iOS Development on 1 Page? Let me know!
Say you want to create a
UIView that you’re going to display in multiple places in your app.
Maybe you want to design a custom
AQGridViewCell. Or maybe you want to create a view controller that can be displayed by several different view controllers in your app. Or maybe you want to create a custom UI widget that shows up multiple times in a view.
Does this mean you have to make the view programmatically? Is it time to break out the
setFrame and the
addSubview and the
setTextColor and the
Nope! You can still design your views in Interface Builder. Here’s how.