2014-11-11

The thick of code

He stared at the code, while his mind made leaps from a function definition to another. He tried to calm his mind and let his brain make connection between that which should be and that which is in his script.

"It is misbehaving, and I must find out the cause of this," he declared alone. His face was illuminated dimly by the dark terminal he was using. Solarized Colorscheme, copied from a site he found. It relaxes the eyes in a mathematical or scientific way or something.

Jumping back and forth with repeated keystrokes, trying to discern the connection and the cause of the error.

At last, he alighted upon the cause. So exacting is the machine.

2013-05-23

Gamers Experimentations

During my younger years, I used to frequent Gamers Experimentations, affectionately shorted to GamEx, a forum for gay gamers. This was a competitor to Gaymers. I didn't really play many video games—my primary reason being that I've been burned by games that had no captioning. However, I enjoyed being with the like-minded people. I enjoyed all the fights, the conversations, and the things that people shared.

It was a balm to the deep and abiding loneliness.

That site is no longer there. The last time I checked, it was starting to get overrun with spam, and only a few people really posted. It was a ghost town, but with writings behind every link.

I am definitely less lonesome now. I have the privilege of more friends than before 2006.

2013-03-01

Untitled

This is the light of the mind.

2013-01-24

Organization

I need to organize my thoughts, and the best way to do that is by writing.

I have signed up for Data Analysis, which I hope will teach me some skills that I can use, but I think my biggest problem is the disjoint between what I read in a book and learn in a class, and what it occurs to me to apply.

I think that was why I sucked at cell biology and chemistry — I simply saw it as a series of classes, and expected to be easily recruited and then working. Yet, I did not devote as much interest as saying "I majored in biochemistry" would suggest. I still remember when asked on that day in Cal State Hayward, what I would like to do in my future with my major. I said that I wasn't interested in being in front of a microscope, half-joking, but also half setting a rapport with the person talking to me. I knew that when I was 18, and it has proven, despite my best effort (applying to jobs, answering questions on the interviews), true.

I hope I learned from my mistakes and can move on.

2012-11-22

ajcfs

I am ending my ajcfs.net account. I don’t blog on Blogger very often. I doubt there’s anyone reading this, really. So, since I don’t use Google Apps related to the website, I have decided not to renew it. I still favor my account at http://www.atomsign.net. I think I may try to get the eight-finger-atom or similar.

This blog will probably revert to using luxdormiens.blogspot.com.

2012-09-13

Community Organizer

Obama the Agitator

It's stuff like this that makes me see the route to Obama winning 2012. If prepared to do so, he will win ruthlessly, regardless of his ideals. Unlike the other politicians who eschewed dirty politics (and thus lose), Obama has had a history of winning by tricks of the trade.

He used the caucus system to accumulate more delegates than Hillary Clinton despite having fewer votes. Then he unified people behind him with his words.

He knocked off Alice Palmer and other candidates off the ballot to win state senate.

Is he then completely cynical, or does he simply have a duality that he is willing to balance more than most?

Will he succeed in proving that electoral organizing and word power can defeat even the deep-pocketed far right? Of course not, this is where the world as one would like it to be vs the world as it is now come into play---as he certainly wouldn't be able to win if he didn't have an army of supporters and of his own well-heeled donors.

2012-09-12

Mythomania

2012-09-05

Democrats Run A Convention On Two Tracks

"Democrats, by contrast, have chosen not to choose."

2012-06-03

Using Nokogiri, Firebug, and UTF-8 to make a Twitter bot


I have made some progress toward creating a Twitter bot for Emily Dickinson. When I first thought about it, I didn't get started right away because I didn't know how. I had some ideas, but they seemed out of reach to me: I thought about using a web crawler that would go through Wikisource and grab the needed poems, but I couldn't understand how to do it; I thought about creating a single file that would contain her poems, and parsing it somehow, but it felt like too much work, and it was precisely what I was trying to avoid. I thought I needed a page that had all her poems in one spot. I thought about using a database, but I have no experience with it whatsoever and I wasn't ready to tackle it.

I forgot about it for several months; I began to tweet from the account less frequently because it was annoying to have to log in to Hootsuite to schedule tweets ahead of time. They made it labarious and repetitive, needing to click on various buttons to set dates and times. Then the copy and pasting got too much for me. How was I going to save more time without abandoning the account?

Several things came together. I saw a video tutorial about screen-scraping using Nokogiri, a Ruby HTML/XML parser. The video tutorial discussed using it to find items on Walmart containing the word "Batman" and parsing the results to find their prices. It involved using Firebug to find class names that they had in common. It didn't yet click to me.

I found the Wikipedia page that seems to have a list that linked to all the official Emily Dickinson poems ever written.

I read about using wget, and I tried to read the man page, but it was too perplexing. I encountered Bastards Book of Ruby, which gave a bit of inspiration to me because it was being written by someone who was a journalist first and a programmer second. In it, there were several tutorials involving screen-scraping, discussing how to go through government websites, statistics that were published by companies, etc.

They were helpful in the way that Nokogiri's documentation was not; where the documentation was intended for people who needed a reference but already knew how to use it, Bastards Book worked because it demonstrated how to use Nokogiri for a specific need.

I used Firebug to find out how the poems were marked--they turned out to use class="extiw". I had to keep playing with Nokogiri in the IRB (Interactive Ruby) interface to figure out how to get to extiw. I just needed to create an array of all the titles and links of the poems. Then for each page containing the poem, I found class="poem". I figured out how to get Nokogiri to do it for me before I coded up something to automate it. I still had problems because the list of poems turned out not to be accurate--some of them were missing an ending dash or were wrong, but I could fix some of them as I went along by writing another program to add a space and dash at the end. It was mildly difficult to do because I learned about encoding issues for the first time. The em dash used Unicode, but while Firefox could display it correctly, it couldn't be parsed. I needed to use Addressable URI to parse the URI and normalize it for access.

I wonder why Ruby was sometimes finicky. I discovered how to set a magic comment at the start of the file to ensure Ruby doesn't get confused and error out.

When I created the Interdiction app, it was set up to use my ajcfs account, I had trouble figuring out how to get it authorized by EmilyEDickinson. I used another gem, called t. I asked the maintainer of the Twitter gem and it turned out that they are adding the feature now--the Twitter gem was probably intended to be single-user. It still doesn't solve the problem as obviously I haven't figured out how to do third-party authorization in the first place. I still look forward to understanding three-legged authorization.

What remained to be done is to split the poem up. I have thought about splitting it by four lines, but the problem is that though the ballad meter is the most common form, Dickinson did vary her poetry quite a bit, sometimes not dividing her poems into stanza, but putting them all together, sometimes dividing into three or five lines. I also need to stay within 140 characters. Curiously, Nokogiri didn't preserve the number of line endings for the poems, so I couldn't divide using \n\n, for example. I ultimately hacked it by dividing for four and cutting it in half if it exceeded 140 characters.

I have worked on it a bit more despite saying to myself that I was finished. I wanted to refactor the code to be less brittle, to ensure that if I came back to it, I would still understand what was going on.

2012-06-02

Netflix Petition

2012-05-07

Disconnection

Leaving the Internet might be a nice idea, but I think it would have been interesting if he had actually tried it without announcing it. If people wondered where he went, he could then explain what he had done. If nobody noticed, then that would have been something he can note. I think quite a lot of people have vanished from the internet without having the platform for it, so his only claim to being unique is that he happens to be a technology writer on a news blog with high velocity of influential people, and he should have said so.

As such, one can argue that this is the sickness of the Internet, it provides no metacognitive ability other than which can be anticipated by everyone else in forms of memes and private jokes.

2012-04-16

Youthful Tattoos Turn Into Grown-Up Regrets

2012-04-09

Google
 
Web luminus529.blogspot.com