June 30, 2008
Programming, Random Thought, Web Development
1 Comment
Over at Jeff Atwood’s blog on the Coding Horror site, there is quick mention of a foible at Mensa’s web site. The problem he alludes to, and which many comments point out and discuss at great length, is the lack of security used with the site’s login credentials.
What I find quite humorous is that the Mensa site’s ‘forgotten password’ page appears to be located within the calendar section of the site as an event. Mensa membership is supposedly based upon processing power and not memory, so why make a calendar event out of a member’s lack of memory? :-P
Happy Albert ‘Cerebronaut’ Hawking Brain Fart Day!!!
June 3, 2008
Education, Programming, Web Development
No Comments
I finally got a syntax highlighter installed. I figure that since I’m taking the free Ruby course at RubyLearning.org, I should make my code look nice (and be more usable) when I decide to put some here on my blog. Just to get things rolling, here is a bit of code from one of the exercises I’ve done during the first few weeks of the course.
class Dog
def initialize(name)
@name = name.capitalize
@what = self.class.to_s.downcase
puts "Hi! I'm #{@name}, your new #{@what}!"
end
def teach(new_trick)
@tricks = Array.new unless @tricks
@tricks += [new_trick]
puts "#{@name} now knows how to #{new_trick}!"
end
def show_tricks
list_of_tricks = [@tricks[0]]
1.upto(@tricks.length-1) do |modify|
list_of_tricks += [" and #{@tricks[modify]}"]
end
@name + ' knows how to ' + list_of_tricks.to_s
end
def bark
end
def eat
end
def chase_cat
end
def to_s
@name + " (your #{@what})"
end
def capable_of?(capability)
self.respond_to?(capability) ?
puts("I can #{capability} or my name's not #{@name}!") :
@tricks.include?(capability) ?
puts("I have recently been taught to #{capability}!") :
puts("This is something I have not heard of before... \
#{capability} you said?")
end
def method_missing(method, *more_arguments)
"#{@name} cocks it's head to the side as if to say \n\t\
\"I don't understand what #{method} means.\""
end
end
# a few examples of usage:
rex = Dog.new 'rex'
max = Dog.new 'Max'
rex.teach 'jump through hoops'
ObjectSpace.each_object(Dog) {|dog| dog.teach('chase cars') }
puts rex.show_tricks
rex.capable_of? 'bark'
rex.capable_of? 'chase cars'
rex.capable_of? 'fetch'
puts "#{max} is feeling a bit left out..."
Sadly, I had misinterpreted the challenge guidelines. The instructor wanted the learned tricks to be methods and not properties. Anyhoot, this post is just so I can see what the highlighter will do on my blog. :-P
May 2, 2008
Education, Programming, Web Development
No Comments
Well, I signed up for a free online Ruby course at rubylearning.org some time last week. Classes start tomorrow and I’m pumped.
I’ve been seeing the popularity of Ruby, decidedly due to the Rails framework, skyrocket in the past few years. It seems that lately, you can hardly go to a web design or web development centric site without seeing a bright red gem or a red locomotive on the home page.
I read somewhere that Ruby is entirely Oo, which really piqued my interest. I’ve been wanting to get my noodle wrapped around OOP for years while dealing with PHP and javascript; not to mention (though I am) my very short lived foray into the seemingly mind-numbing world of C++ that I embarked upon.
Once I realized that Ruby might hold the key to my eternal salvation, I decided not to take my usual tack when trying to learn a programming or scripting language. That process would be best described as: buy a few $50 tomes, crack them open enough to get a feel for the writers’ personalities and then let them sit on my bookshelf while knowing that I am free at any time to pick them up and soak it all in.
February 23, 2006
Personal, Random Thought, Web Development
No Comments
Alright, I’ve decided to try w.bloggar on my windoze pc. It seams to have everything I could need to keep my blog up to date without any hassles from what I’ve read about it online. We’ll see. It doesn’t take much. I’d like to be able to see my categories, different blogs, and all my existing posts and be able to modify any of them from here.
I used a carriage return before this paragraph. I’m not sure if w.bloggar automatically creates paragraphs when I use a carriage return or not. I’ll throw a couple of paragraphs in without paragraph tags to see. In fact, I’m gonna delete the paragraph tags I’ve already got here to see if it posts carriage returns as paragraphs. Then, I can check out it’s editing of existing posts once I know how it marks pages up (or not).
Well, judging from the preview window within w.bloggar, it throws break tags into the mix if I use a carriage return. I’ll just stick with using my own paragraph tags in the posts.
It would be really nice if this program would use ’strong’ tags instead of ‘bold’ tags when I use the included markup tools. Sadly, it uses ‘italics’ tags instead of the proper ‘emphasis’ tags as well. Heck, maybe I should just take the 15 seconds necessary to log into my blog using a browser and publish that way. At least then, I know I’m getting to use all of the features my blog has available (besides remote publishing… hehe).
By the way, I don’t see anywhere to input a heading in this thing. I did when I had it aiming at my b2evolution site, but not with my blogger site. Oh well, here goes everything.
February 22, 2006
Personal, Random Thought, Web Development
No Comments
I just added the Performancing extension to my Firefox. I just want to see how it does at adding posts to my blog.
I’m also typing this up in it’s ’source editing’ mode, so the page will come through the way I want it to (hopefully). I’ll have a look at what it does with technorati tags in a minute, but I already see it’s integration with del.icio.us is pretty minimal at best. It simply logs into your account so that you can manually add bookmarks and lets you see your tags.
Enough of this; I’m gonna send this through and see what happens. This paragraph should be styled as white text on a maroon background, by the way.
June 3, 2004
Designing, Graphics, Personal, Programming, Random Thought, Web Development
No Comments
Central Illinois Artists Project is a site I am currently working on for Central Illinois artists. I do so because I am one… hehe. I suppose it will mainly be for original musical artists at first, as that is my primary interest and it seems a lot more feasible in the short term of things to keep it simple. Anyhoot, I just wanted to share that. There’s still a tonne of work to be done on it, but at least it’s coming together now. I’ve been working on this for over a year (in my ’spare’ time… heh), and I’ve owned the domain for about two. I hope to have at least the artists able to build their own band page within a week. After that, I will let a few of the locals know it’s usable. They should be able to share their concert schedules, pictures, music clips and whatnot.
If my writing seems a bit erratic, I believe it’s because I only got an hour of sleep last night. I’ve been off work for a couple of weeks with a bad back, and the sleep schedule has gone pitooueyyy.