Ramblings Of a Madman

Yeah, like i would know a good description…

Posts for Tag: writing

Introducing Simple Rails Blog

Yes, a new blog. I know what you are thinking: "Who the hell cares?". But read me out.

A while back i looked at wordpress and thought "i don't really need all this stuff, do i?". Turns out i didn't. And if you are at least a little bit like me you will agree that sometimes less is more. After searching for some alternatives i ended up with two solutions: A company hosted blog (tumblr, blogger, and others) or hand made. I chose the latter. 

So let me introduce you to my new open-source Rails blog. Developed with simplicity in mind, it allows you to write and (easily, even automatically) tag posts. That's it.

Full source code is available at bitbucket. If you are a Rails developer (or a plain developer with an open mind) you will find it trivial to adapt it to your needs.

Enjoy, Pedro

Thoughts on writing

Sometimes i wonder why anyone enjoys writing at all.

As if my mind was not confusing enough, with all the absurd and senseless thoughts that run through my head all day long. Why the hell would i want to write any of that on paper? For later to recall, as the famous Portuguese ad went? I know i will "later" laugh while reading all of it but that can't be the only purpose? To organize chaos? To try to motivate myself to write, so i don't lose the skill? To not allow my calligraphy to completely die on me? To try to keep some grammatical capacity i might still possess?

It is definitely not to burn time! Between work, computer games, playing guitar or drums, practice martial arts, and so many other possible occupations, i can think of better choices to spend it.

Then why? Is there a goal? Just good for the soul? :)

Red Hot Chili Peppers lyrics generator

Here's a little something i tried yesterday: a ruby script that mixes and matches verbs, nouns, adjectives, and colors to come up with crazy ass lyrics, red hot style. Enjoy :)

$nouns = IO.readlines('names.txt') $adjectives = IO.readlines('adjectives.txt') $verbs = IO.readlines('verbs.txt') $adjectives << ['red','blue','green','white','black','yellow','brown','gray'] $pronouns = IO.readlines('pronouns.txt') $adverbs = IO.readlines('adverbs.txt') $prepositions = IO.readlines('prepositions.txt')

def get_rand(collection) sleep rand / 10000 collection[rand * collection.length.to_i - 1] end

def preposition_phrase "#{get_rand($prepositions).strip} the #{get_rand($nouns).strip}" end

def adjectivated_subject_phrase the_part = "the" if rand.to_f > 0.5 adjective = get_rand($adjectives).strip if rand.to_f > 0.5 return "#{the_part} #{adjective} #{get_rand($nouns).strip}" if the_part and adjective nil end

def generate_phrase as = adjectivated_subject_phrase adjectivated_subject_part = as.nil? ? get_rand($pronouns).strip : as preposition_part = rand.to_f > 0.5 ? preposition_phrase : "" verb_part = get_rand($verbs).strip object_part = rand.to_f > 0.25 ? get_rand($nouns).strip : "" the_part = (rand.to_f > 0.5 and object_part != "") ? "the" : "" adverb_part = rand.to_f > 0.75 ? get_rand($adverbs).strip : ""

"#{adjectivated_subject_part} #{preposition_part} #{verb_part} #{the_part} #{object_part} #{adverb_part}".squeeze(" ").strip end

def generate_lyrics result = "" (1..5).each do first_phrase = generate_phrase new_phrase = generate_phrase while new_phrase[-2, 2] != first_phrase[-2, 2] or new_phrase.split(" ")[-1] == first_phrase.split(" ")[-1] do new_phrase = generate_phrase end result << "#{first_phrase}\r\n#{new_phrase}\r\n\r\n" end result end

puts generate_lyrics Here are the sources: rhcp_lyrics_v2.tar. As a bonus there is a script to see how many attempts are required to reach the phrase "The quick brown fox" :)

How to lose half your page visits in 1 month (and how to recover from it)

A while back i changed my blog domain name from diffract.me to pedroassuncao.com. However, i was dumb enough not to redirect the traffic to the new name - in a transition period. The result? A drop from 100+ visits per day to less than 20.

I have to admit that it kind of bummed me out a little. Being a Buddhist-light i tried my best not to let it get to me and told myself that it would eventually recover just as long as i kept writing stuff that can help some people - combined with nicely chosen post titles and search engine keywords.

Turns out i was right: a couple of months later the visits are slowly recovering - as you can see from the screenshot of my analytics account.

That is all very neat but where is the "helping people" part, you might ask. Here it is: I thought i might share some of the techniques i currently employ to attract people to look at what i write. They are no different from what others have blogged about before, but it's always good to share this information around with prospective new bloggers:

Write about stuff that you think will help other people. This may mean writing about solutions to problems you yourself encountered, or just writing about interesting stuff you did/saw/ate/whatever that other humans will possibly find interesting :) Read a lot of news/blogs/stories about stuff that you have interest in. And *write insightful* comments on them. Most comments systems will allow you to enter your URL and/or twitter name and will show those in the comments you write. This is a great way to drive the curious people back to your site; For every helpful post you write, submit the link to the major news sites (think digg, reddit, hacker news, etc). This will make sure that search engines will have more interest in your site, since you will be linked back when they crawl those. It will also make some more people aware of what you are writing, which leads me to the following point... ...Write catchy post titles. And by catchy i don't mean cheesy or sensationalist. Create a habit of getting to the point in your titles while - at the same time - being original to entice curiosity. Writing titles is a form of art in itself, believe me; Link whenever you are referencing something that can be linked to. Again, search engines will use this information to your advantage in page rankings. And other bloggers will appreciate the traffic, so it's a win-win situation :)

That's it. Happy blogging, and feel free to drop me a line ;)

Latex in Google Docs

Pretty cool stuff, now you can edit Latex from google docs. Check it out here. Too bad i decided a long time ago to use HTML+CSS for my resume, otherwise i would definitely give this a try over offline Latex editors :)

Organizing texts

I recently took another look at all the different texts I wrote in the past and came to the conclusion that I really need a central place to handle all of that.

Due to the fact that I don't feel like maintaining the Java desktop application I created for that effect, I decided to put my Django skills to good use once again and create something web based.

And since it's web based, I guess there will be no harm in opening it up for other people to store their own writing, if they so wish :)

http://diffract.me:8082/

Peace

UPDATE: As suggested by @shannonlucas, just added a test account for everyone who wants to try it without signing up: (user test, password test)

Blog usability tips

I recently came across a really useful article about blog usability tips. I still think the best tip for any blogger is to write about things he/she is passionate about, but these can give you a bit of a boost presenting your content.

Here's my take on some of their tips:

Pick a topic for your blog. Yes, if you write about one topic only. If, like me, you write about a wide variety of subjects then I don't think it's so relevant. What I would add is to categorize/tag your posts very well; That will make them easier to find and subscribe to only certain aspects of your writing. Encourage comments. Absolutely. Discussion will keep your readers engaged, so that's something you definitely should allow and push for. Make it easy to subscribe. An RSS link in a visible location is definitely a plus to help people follow you. The subscribe by email thing, I'm not so sure. I don't think that many people read blogs by email, but feel free to disagree :) Keep posts short and to the point. This is important. No one likes to read long chunks of text. If you really have a lot to say then...

...Use subheadings for long posts.

Link abundantly. Now, this is one I am tempted to disagree with. Depending on the appearance of your blog (CSS styles) this can make it unreadable (a lot of different text colors and styles, changing every other word). Also, too many links will just make for people to get tired of it and only following the first two or three, when the last one could be much more interesting. I would say: Link wisely. Make headlines descriptive. Important but - again - don't exaggerate. If you do, your readers will be disappointed that you are not "advertising what you are selling". Include a list of related posts beneath each post. It will suggest other things your users might find interesting. For the same reason, you should also...

...Include a Top Posts section and... ...Include a Recent Posts section in your sidebar.

Present your real viewpoint. Share your opinions on the things you write about. That will make your blog more personal, hence more interesting than plain raw facts/theories. Reward commentators for commenting. Everyone has an ego. And every ego likes to be fed. Enough said :) Post often. But make sure you don't trade quality for quantity. It's better to write less stuff that is really good, than crappy things more often. Think about how many people read Paul Graham's essays? And how often does he come out with a new one?

You can read the full article here. It includes links to popular wordpress plugins (if your blog, like mine, happens to use wordpress), more tips, and a lot more comments on each of them.

I have also found this post by Tim Ferriss to be very interesting. He talks not only about design aspects, but also blogging tools, post frequency, best practices, and a lot more.

The site is back

After struggling for a while with the server's remote admin interface I managed to bring the whole thing up again.

I'm currently planning to start working on an idea that has been tinkling around in my brain for the past few days. More on that later.

New blog... yes, I know, another one...

…but bare with me on this. It's going to be a place where I will post all of the stupid ideas that go through my mind, no matter how dumb-as-f@ck they are.

Read more on the first post: http://nocivus.tumblr.com/post/110480581/the-first-idea

The need to unplug

Did you ever feel the need to unplug from your online life? I'm referring to the range of social networking tools that we have around us, like facebook, twitter, posterous, plaxo, linkedin, hi5, pingfm, just to name a few. I know I have, in more that one ocasion, and today I finally started thinking about it seriously.

Every day I grow more and more overwhelmed by the amount of information that surrounds me (and that consumes my time); The twitter updates, the photo uploading on flickr or picasa web, all the blogs to read, the blogs to write on, it's just too much information (and little bit waste of time, in some cases). So, going for Pareto's principle, I will gradually start to cut back on those services. Hopefully, this will give me some time back.

This means that I can finally put a bigger effort on my soon to be moved homepage and consolidate it as the *only* place where I post stuff (the final mileage may vary).

Wish me luck ;) Posted via email from nocivus' ramblings