28.03.09, Filed Under: Jokes and Stuff with 0 Comments
I was browsing the Internet, or as I like to call it the “InterWeb,” and I found an interesting marketing ploy for shared web hosting. A company, which will remain nameless for legal reasons, advertises unlimited shared web hosting for the cheap price of about 6 US dollars per month if you purchase for 10 years in advance. What a deal right? Well, to further this awesome deal they felt the need to add 50 gigabytes of data to the already unlimited gigabytes of storage space that is included in the single package they offer customers. Interesting I thought. Does this kind of marketing strategy work? Who are these companies marketing to who think that their valued customers, and potential customers, do not understand that infinite is the greatest non-specific number attainable in math… And more importantly, why is the 50 GB of extra space the selling point? I laugh… But think it probably works; which is sad.
23.02.09, Filed Under: Information with 0 Comments
At some point over the past week the hosting company I use had a ‘hard drive issue’ and unfortunately had to revert all hosting accounts to data from around December 2nd, 2008… Yes, the last back up they had was over 2 months old. Not only is it unsettling that they had such _old_ back ups of their clients software, but I have checked my e-mail history and see no communication from them letting me know that I had lost all of the last two months of progress and data. Upon logging into my client control panel I noticed a 6 month credit for hosting — does this somehow make it okay for 2 months of work flushed away? No. In fact, I’d rather have those two months of work back. Luckily, I back up the important things every now and then. Still, the urking continues as I see in my e-mail inbox news from the hosting company to do data migrations to new ‘more powerful’ servers. Let me ask this: Will the power of these servers keep the hard drives from having ‘issues’……. Issues are bad m’kay.
If you noticed down time or old content it has now been fixed and I apologize for the potential ‘content not found’ messages that awaited viewers access attempts.
As of lately, however, I have been doing something pretty neat: teaching a Ruby on Rails workshop on my college campus to students. I wanted to try introducing web framework technology + newly popularized programming languages so naturally Ruby on Rails was a perfect fit. I’ve now constructed 2 workshops, each lasting roughly 6 hours, and have had extremely high interest and attention spans from students. In the coming week I will be having at least 3 workshops and they take place on weekends. I’ll be writing up information about that soon, so if you are interested in learning Ruby on Rails and are local Santa Barbara, CA I encourage you to attend. If you don’t even know what Santa Barbara is I still encourage you to learn more by checking out the presentation I will be posting in the following weeks. (Expressing interest in this presentation will speed up how quickly I post it…)
23.02.09, Filed Under: Software with 0 Comments
Recently I moved over (from Windows XP) to Mac OS X. Two reasons motivated my move; the first was for better Ruby on Rails environment support (work) and the second was for a new laptop with a little more kick than the previous one (fun).
Do I think this was an “upgrade,” and am I happy with the new operating system compared to Windows XP Professional? The short answer is No. The longer answer is Yes. To be honest, I am so comfortable in a Microsoft Windows that moving to Mac OS X has been painful. Yes, I said it, painful! Simple task shortcuts that I have grown so accustomed to, like Right-click->Create New File… Please do inform me if this exists and I have overlooked it, but I can not seem to find a “Create New File” option in my right click. Oh yay! I can create a new folder or a burn folder, but no-sir you can not create a new file. Maybe you could tell, or maybe you could not, but this is my biggest pet pieve to my new operating system. While I have not jumped on the band wagon and become one of those bumper-sticker boasting Apple owners, I will say that Apple has done a great job taking a *nix based operating system and skinning it to both look beautiful and function superbly. I am still learning how to use the Mac OS X but from what I have experienced so far I have to say it is a phenomenal operating system and I definitely prefer it over Windows at this point.
To play the role of devils advocate, here are some of the things I have come to love about my new mac:
and some of the speed bumps I have felt along the way:
By no means are the lists above qualified to illustrate my top ~5 likes and dislikes, rather they just serve as starting points for what I have come to most prominently notice. Being a heavy computer user these are the things I notice because the speed at which I move to complete these tasks are dependent on the ease of using shortcuts provided by my operating system.
I started this post in November and am finally getting around to hitting the publish button. Eventually I would like to expand this post or create a parallel post that highlights the top short cuts… But Google has so many result sets that include such aforementioned lists that it may never happen. If you have anything to comment in regards to the post or a familiar transition please feel free to comment. I would very much enjoy hearing other peoples opinions on what they found alarming or relieving either to or from Mac OS X (whether it be hardware, software, or socially related).
14.11.08, Filed Under: Ruby on Rails with 0 Comments
Fact: Code can be developed that contains no bugs.
Fiction: That the above happens often.
The act of software development in itself is prone to many errors; typo’s, assigning one variable to another without remembering variable types, and more often adding features to existing software and not updating all of the calling code that now does not know it has to pass in a third method parameter.
To combat the unseen errors we can call rake commands to run our unit, functional, and integration tests. But if the tests are not up-to-par, for example they all assert true regardless of any actual testing, then in reality the results are meaningless. So, in essence, to combat poor test coverage, which tries to combat errors in feature development, I decided to give Rcov a try. I took my latest RoR project and built a rake task to run my unit, functional, and integration tests through Rcov. At first I was rather upset when I saw the Rcov results; I was pretty much being told I failed test writing class. On we go…
What is Rcov?
Rcov is a necessary tool if you want to write code that not only works but will also allow for expansion and adaptation (and there are other reasons as well, but that is for you to find out). Technically, it is a tool that measures your code coverage from your tests in a Ruby (and RoR) project. Taken from eigenclass.org, the maker of Rcov, the main points are presented as follows:
* fast execution: 20-300 times faster than previous tools
* multiple analysis modes: standard, bogo-profile, “intentional testing”, dependency analysis…
* detection of uncovered code introduced since the last run (”differential code coverage”)
* fairly accurate coverage information through code linkage inference using simple heuristics
* cross-referenced XHTML and several kinds of text reports
* support for easy automation with Rake and Rant
* colorblind-friendliness
With that all said, the point of this entry is to not only get other developers using Rcov, but to also share my rake task that I put compiled after reading a few blogs and looking at other Rcov rake task plugins and examples sources. My code was mainly adapted from Alan Johnson ( github plugin project page ).
Mileage may vary. I created a file called rcov.rake in my project/lib/tasks/ folder and its contents:
def run_coverage(files) rm_f "coverage" rm_f "coverage.data" # turn the files we want to run into a string if files.length == 0 puts "No files were specified for testing" return end files = files.join(" ") if PLATFORM =~ /darwin/ exclude = '--exclude "gems/*"' else exclude = '--exclude "rubygems/*"' end rcov = "rcov --rails -Ilib:test --sort coverage --text-report #{exclude} --no-validator-links --aggregate coverage.data" cmd = "#{rcov} #{files}" sh cmd end namespace :test do desc "Measures unit, functional, and integration test coverage" task :coverage do run_coverage Dir["test/**/*.rb"] end namespace :coverage do desc "Runs coverage on unit tests" task :units do run_coverage Dir["test/unit/**/*.rb"] end desc "Runs coverage on functional tests" task :functionals do run_coverage Dir["test/functional/**/*.rb"] end desc "Runs coverage on integration tests" task :integration do run_coverage Dir["test/integration/**/*.rb"] end end end
More information on Rcov is available from the links below:
22.10.08, Filed Under: Ruby on Rails with 0 Comments
Here is a short snippet of Ruby code that I wrote today to detect client browser types. (to override CSS styles based on client browsers..) Hope it helps.
def client_browser_name(user_agent_string) case user_agent_string when /msie 6/i "IE6" when /msie 7/i "IE7" when /msie 8/i "IE8" when /konqueror/i "Konqueror" when /firefox\/2/i "FF2" when /firefox\/3/i "FF3" when /applewebkit/i "Safari" when /gecko/i #generic case where FireFox is not in String (ie. MindField, BonEcho, GranParadiso) "Mozilla" when /opera/i "Opera" else "Unknown" end end
19.09.07, Filed Under: Code with 0 Comments
As a developer I have faced many problems with tooltips and getting div’s to appear, disappear, and jump through hoops. Today I figured out a nice way.
This code below dynamically shows and hides certain div’s. Using no onClick event handling. There are 3 pre-reqs,
Here is the code below. I have made bold the appended “ToolTip” for each unique ID and the “#Change_Me” which needs to be changed to reflect your code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <script> function hideTip( self ) { $("#" + self.id + "ToolTip").css("visibility","hidden"); } function showTip( self ) { $("#" + self.id + "ToolTip").css("visibility","visible"); } $(document).ready( function() { $("#CHANGE_ME") //Change this to the ID that contains your tooltips as a whole. .find("input[@type=text]") .focus( function() { showTip(this); }) .blur( function() { hideTip(this); }).end() .find("select") .focus( function() { showTip(this); }) .blur( function() { hideTip(this); }).end(); }); </script> |
This code should be inserted in to your <head>.
In your body, you will have code that looks like:
1 2 3 4 5 6 7 8 9 | <div id="CHANGE_ME"> <table border="0" cellspacing="4" cellpadding="8"> <tr> <td style="text-align:right">name</td> <td><asp:TextBox ID="uniqueName" MaxLength="64" Width="197px" runat="server" Text="Sample Text Box" /></td> <td id="uniqueNameToolTip" > <img src="/images/ToolTipName.jpg" /></td> </tr> </table> </div> |
That’s it. Now, when the page loads you will find that when you focus on the text box the tool tip in the right column of the table will appear. I know the formatting is a bit off, bear with me! Question/Comments please post. Note this was developed on an asp.net page, but the concept and functionality (of the javascript) persists on asp, asp.net, php, so forth.
19.09.07, Filed Under: Hardware with 0 Comments
My oh my. My new video card arrived last night thanks to UPS. First of all, I have a small shuttle case which is packed with hard drives and other over sized peripherals and was not sure the card would fit. It did and it fit perfectly. This is quite an upgrade from my Sapphire x850XT that I had. The 2600xt is literally a tech savvy movie buffs best friend. It uses on board processing to decode x264, which is the new format high quality files are coming in today, and is simply amazing.
I immediately fitted the card in to my case, booted, and began on VGA connection. I was limited to just a little over 720p resolution so I then decided to try the HDMI support that the 2600xt boasts and I jumped up to 1080 instantly. My desktop looked edgy and blurred here and there, along with being very bright. The video looked flawless and breathtaking. Watching a 720p video in 1080p looked great so I decided to try a 1080p video and let’s just say I could see the hairs on the marijuana being sold in the TV show Weeds.
What more is there to say? I did the research and found this particular card to be the best priced and feature packed- I am very happy with it so far. Though, I have only had it about a day now.
Learn more about this card [link]
Post comments/questions.
19.09.07, Filed Under: Designs with 0 Comments
Here is a flurry of designs, enjoy!
click here to download .psd
click here to download .psd
click here to download .psd
click here to download .psd
click here to download .psd
(Sorry I don’t have a screen shot up right now) Click here to download the .psd file of some white and blue snow themed brown/black themed template.
17.09.07, Filed Under: Information with 0 Comments
It has come to my attention, through Slashdot and the many online sources, those bandwidth providers are now looking at the amount of bandwidth used by a customer and then shutting their internet off when a certain invisible limit is reached.
I personally felt this was inevitable and that companies have been doing this for quite some time. It makes sense that companies are starting to announce their hidden agenda’s at this time, because internet bandwidth consumption has risen at such great rates due to video on demand, sites like YouTube, and the fact that the internet is evolving into one large application.
We will see where this goes. Bandwidth is measured at a small level in terms of MB (megabytes) and most commonly measured as GB (gigabytes, which are 1,000 MB). If the average consumer uses 20GB of bandwidth monthly, can you imagine what it will cost for the high tech user who uses 100GB/mo in bandwidth?
Related articles/sources: