Skip to content

Category: Uncategorized


I’m a bit behind in doing filing at home, but I made a good start of it last night. There’s still more to do tonight.

Just Kids

Just KidsJust Kids by Patti Smith
My rating: 5 of 5 stars

A few months ago I heard an interview with Patti Smith talking about this book and her time with Robert Mapplethorpe. I was aware of both of them, but didn’t know they had a history together, which intrigued me enough to buy the book.

The book covers a period of time from the mid 60s, when Smith is still living in New Jersey with her parents, to the late 80s when she is raising a family of her own in Detroit. The bulk of the story however, takes place in New York City in the late 60s and early 70s, as both Smith and Mapplethorpe are new to the city. Throughout the book, Smith writes of the tragedies of the era, such as the deaths of Janis Joplin, Jimi Hendrix, and Jim Morrison. This leads to a darkly comic account where a friend of Smith’s with a J in his name is convinced he’s the next to die because the letter J is like a curse, bringing an early death to those affected.

Having read some poorly written autobiographies of other musicians, I found Patti Smith’s writing to be both wonderful and evocative. She makes the reader feel as if they are with her, as she describes places as varied as the Père Lachaise Cemetery, Max’s Kansas City, the Hotel Chelsea, and countless apartments and studios that she and Robert shared in New York City. As well as the places, she offers such rich details of moments, that the reader feels they are there with her. For example, she shares an anecdote about Alan Ginsburg paying for her lunch at an Automat, but mainly because he mistook her for a cute boy. Writing about these moments, she describes the scenes and recalls the conversations, immersing the reader in a version of New York that no longer exists.

Most of the book is about Smith’s relationship with Mapplethorpe. Shortly after moving to New York, Smith is basically homeless, when Robert sees her and takes pity on her, offering her some food and a place to stay. They bond over an appreciation of art, as both of them aspire to become famous artists. However, being “just kids”, they had a lot to learn as they tried expressing themselves through different artistic mediums. For Robert, collages led their way to photography. For Smith, her drawings led her to poetry, which further led her to music. Each served as muse for the other, but they both found other sources of inspiration along the way.

While the obvious audience for this book is people who like to read autobiographies of musicians, people who are interested in Robert Mapplethorpe and his art will also enjoy it. The arts scene in New York City plays an important part in the book, most notably Andy Warhol and The Factory. The book will also appeal to those who are interested in love, poetry, and NYC history.

View all my reviews

Working on Amore v0.2

Version 0.2 of Amore is shaping up but still needs a bit of work. It’s still alpha quality software, so it’s very unpolished, but it’s much better than version 0.1.

To start, the software borrows heavily from uses w3.css to make it responsive to a variety of devices. It looks good on computer screens, tablets, and smartphones.

Users are required to login to post. There is some admin functionality for adding, editing, and deleting places, times zones, etc.

Still to do for v0.2:

  • Finish edit-profile.php.
  • logout function.
  • Admins can suspend or ban users.
  • Users can delete their own posts.
  • Users can edit their own posts (up to ten minutes after posting).
  • Remove OpenGraph stuff.

Messing around with code

Coding is something I do so rarely I often have to look online for tips and go through alot* of trial and error to get things done. On the current project, I wanted to do something differently.

Normally, in most database tables, it’s common to create an ID field to hold a number that serves as a unique identifier for that record (commonly known as a primary key). It’s easy to setup because the database does all the work, therefore it’s a very common form of primary key. However, primary keys don’t necessarily have to be numbers. The only requirement is that they be unique within the table.

For this project I wanted each primary key to be 10 characters long and consist of numbers and letters. Ten digits, plus 26 lowercase characters, plus 26 uppercase characters in a ten character string means 141 trillion possible unique keys (10+26+26)10 = 141,167,095,653,412 That should be enough for any database… that I’m working on.

In playing around with the code I realized there were a lot of other possibilities. I didn’t have to limit myself to numbers and the Latin alphabet. In fact, I didn’t need to use them at all. The code below is the same code I came up with, but the characters I used are different.

// generates a 10 character random ID
function id_gen($newid) {
$chars = "⩽⩾⩿⪀⪁⪂⪃⪄⪅⪆⪇⪈⪉⪊⪋⪌⪍⪎⪏⪐⪑⪒⪓⪔⪕⪖⪗⪘⪙⪚⪛⪜⪝⪞⪟⪠⪯⪰⪱⪲⪳⪴⪵⪶⪷⪸⪹⪺";
$tmp = preg_split("//u", $chars, -1, PREG_SPLIT_NO_EMPTY);
$tmp2 = join("", $tmp);
return mb_substr($tmp2,0,10,"UTF-8");

Calling id_gen in some PHP code would result in something like this ⩾⪺⪐⪒⪞⪠⪎⪉⪚⪷. Imagine a table full of those as their primary keys. The key to the function is PHP’s builtin mb_substr function. The normal substr function will take a string and cut it to a particular length, but it doesn’t do well with most UTF-8 characters. The mb_substr function can handle multibyte characters, which is why it’s used in this function.

* Fuck prescriptivist grammarians. “Alot” is a perfectly legitimate English word. If it gets used and is understood in context, it’s part of the language.