Ryan Rampersad

Opinions, Thoughts and Ideas - PHP, Java and Javascript

  • Home
  • About
  • Contact

Logitech Performance MX Mouse Review

By Ryan on August 31, 2010

A few weeks ago, I ordered a Logitech Performance MX mouse from Amazon. I’ve struggled with hand pains for as long as I’ve been in high school, so about three years now. This mouse caught my eye a few months ago, but the price tag was too high back then. I bought it for a nice $79.99 and as a bonus, it came with a $15 rebate whittling it down to only $59.99.

The first few days of using the mouse, my hands hurt. I would loosely hold my old mouse, my wrist would rest on the mouse pad and I would propel the mouse with my fingers. The thumb and pinky would cradle the mouse on the sides, and my pointer and middle fingers would rest on the left and right buttons. That’s how it used to be. It’s essentially the same now, but instead of resting my wrist completely on the mouse pad, it’s half on and half off. The pain is more or less gone now, after two weeks of using it every day. So that’s about it for the paid points.

I’ve fallen in love with the fast scrolling feature. The button the top of the mouse changes the way the scroll works. The default way of course is the granular clicked based scrolling. Each amount of course will only allow the will to move so many clicks, scrolling only so much. When the button on the top is pressed though, it goes into superfast scrolling move. Basically, the clicks go away – there is no resistance. This allows me to scroll to pages so fast. It’s hard to describe what you’re missing when you don’t know about it. For instance, if you’re on my blog’s homepage, you could scroll through it incredibly quickly despite it being so long. In long emails, I use the fast scrolling to quickly go down and up too, it’s so easy.

The darkfield laser is a nice selling point, but that’s about it. I’ve never taken it away from my desktop, but that may change when I start going to school again. Even then, I doubt I’d ever actually run it over a glass table. Seriously, my desktop (my literal desk) is made of glass. The mouse works flawlessly on the glass, but I don’t think it’s anything to be drooling over. I must say, Dark Field is absolutely amazing as a name, it sounds very much like The Force.

The four left side buttons don’t get much use but that’s my fault. First, the back and forward buttons are something I always forget. I tend to just click the back button if I want to go back. Why do you go forward anyway? Moving along to the zoom function: it is weak. Zoom might be really great with Linux or OSX when the entire screen scales up accordingly. The way the Logitech zoom works is that it scales up the text in whatever browser window you’re using. I don’t like that, I want full screen zooming. I think this is more of a Windows deficiency than a mouse problem, but until Windows can actually zoom sensibly, it won’t be useful.

I was kind of excited for the expose-like feature. It isn’t anything like OSX’s expose. Nothing like it at all. it’s slower, but not sluggish. Since it’s not native, it’s of course going to be slower. It dims the screen, it moves the windows based on their size and some other algorithm. I use dual screens and I have to admit they didn’t account for this, because window previews will bleed over. Again, like zoom, this feature has to be implemented at an OS level before the mouse can safely do it justice.

You can click on the image to see it larger. You can see that the arrangement wastes loads of space and it makes things harder to see. As I’ve said before, native OS is the way to go.

Battery life is decent. My old mouse was a cordless double-A optical mouse and it would last a few weeks to a month or two. This new mouse lasts about three days before it tells me to recharge it. Of course, this sounds annoying but because Logitech gave me the AC-USB adapter, I have it plugged into a power strip and looped around one of the legs of my desk. I can plug in the mouse easily when I go to bed at night – it’s akin to turning off the monitor. The charging cord is a bit funny though, it’s ergonomically formed. The USB port on the mouse is also at an angle, which makes it kind of tricky to plug the mouse in without turning the mouse port to face you so you can actually see what’s going on.

There isn’t much to say about the universal receiver. It’s plugged in the front of my tower, where you would normally quickly insert flash drives. It’s close to the mouse, so the reception is undoubtedly good, and it would probably remain so even if further away. I love that it’s small, so if I did take it with me and attach to it a laptop, it wouldn’t get damaged.

I think that about covers it. The mouse is fantastic, it’s reduced hand and arm pain, the scroll wheel is incredible. For the new price of $79-$59, it’s a great deal if you need a nice new ergonomic mouse. I give it a 5 out 5.

Posted in Reviews | Tagged Dark Field, expose, feel, logitech, mouse, price, scroll wheel | Leave a response

Why you shouldn’t use your debit card online

By Ryan on August 27, 2010

This is a technology centered blog, but every so often I blog about something else. Recently I needed to explain to my grandmother about the folly of using a debit card online. Basically, I crawled the internet for lovely quotes from various entities that could explain why it was a horrible idea to use debit cards online.

“You don’t use a debit card online,” says Susan Tiffany, director of consumer periodicals for the Credit Union National Association. Since the debit card links directly to a checking account, “you have potential vulnerability there,” she says.
Her reasoning: If you have problems with a purchase or the card number gets hijacked, a debit card is “vulnerable because it happens to be linked to an account,” says Linda Foley, founder of the Identity Theft Resource Center. She also includes phone orders in this category.
The Federal Reserve’s Regulation E (commonly dubbed Reg E), covers debit card transfers. It sets a consumer’s liability for fraudulent purchases at $50, provided they notify the bank within two days of discovering that their card or card number has been stolen.
Most banks have additional voluntary policies that set their own customers’ liability with debit cards at $0, says Nessa Feddis, vice president and senior counsel for the American Bankers Association.
But the protections don’t relieve consumers of hassle: The prospect of trying to get money put back into their bank account, and the problems that a lower-than-expected balance can cause in terms of fees and refused checks or payments, make some online shoppers reach first for credit cards.

Quote from Yahoo Finance

Federal law also protects you if you need to dispute charges on a credit card, but not if you use a debit card or other forms of payment. If you paid cash or used a debit card, the retailer already has your money. So you have a lot less leverage, and there’s no guarantee you’ll get that money back. But if you pay for something with your credit card and aren’t happy with the purchase, your card issuer can legally withhold payment from the retailer until they resolve the dispute, and you won’t be charged.

Quote from The New York Times

The safest way to shop on the Internet is with a credit card. In the event something goes wrong, you are protected under the federal Fair Credit Billing Act. You have the right to dispute charges on your credit card, and you can withhold payments during a creditor investigation. When it has been determined that your credit was used without authorization, you are only responsible for the first $50 in charges. You are rarely asked to pay this charge.

We recommend that you obtain one credit card that you use only for online payments to make it easier to detect wrongful credit charges. For more information on credit card consumer protections, see http://www.privacyrights.org/fs/fs32-paperplastic.htm#3

E-commerce shopping by check leaves you vulnerable to bank fraud. And sending a cashier’s check or money order doesn’t give you any protection if you have problems with the purchase.

Make sure your credit card is a true credit card and not a debit card, a check card, or an ATM card. As with checks, a debit card exposes your bank account to thieves. Your checking account could be wiped out in minutes. Further, debit and ATM cards are not protected by federal law to the extent that credit cards are.

Quote from Privacy Rights

You probably don’t often hear advice to use a credit card instead of a debit card or cash, but if you can do it responsibly, you absolutely should. Credit cards offer protection from identity theft that debit cards don’t. For example, with a credit card, your liability for fraudulent charges caps at $50 as long as you report the fraud within 30 or 60 days (depending on the company). However, if you’re using your debit card online and someone gains access to it, they can clean out your checking account before you even learn there’s a problem. It’s likely you’ll get part of that money back, but possible that it can take a while, and that you won’t get it all. So, use a credit card instead and pay the bill off monthly.

Quote from About.com

These quotes didn’t get through to my grandmother, but perhaps they’ll be better put to use here.

Posted in Abstract | Tagged cards, debit, issues, online, problems | Leave a response

How The Apple Event Will Go

By Ryan on August 26, 2010

It shouldn’t be hard to imagine how the Apple Event next Wednesday will play out. Every event has a basic setup.

Image from Apple Insider.

So the event will be like this:

  1. Jobs: “Welcome, greetings everyone, it’s great to be here, I’m please you all could join us today too”
  2. Jobs: “So, a few numbers before we start here …” (iPhone sales, iPod Touch sales, iPod sales)
  3. Jobs: “So here is our updated iPod Touch – it likes iPhone 4…”
  4. Jobs: “Here is a new iPod Classic, here is a new iPod Nano, here is a new iPod Shuffle…”
  5. Jobs: “And of course we’ve updated iTunes…”
  6. Jobs: “One more thing…”
  7. Jobs: “There have been a lot of rumors about this lately…
  8. Jobs: “Well, there is the updated Apple TV… but we’re renaming it…”

Isn’t that how it will play out? Almost certainly.

Posted in Apple | Tagged Apple, event, ipod, music | Leave a response

Senior Year Class Schedule

By Ryan on August 25, 2010

It has finally come after a long delay: my senior year class schedule. After I was sent my PSEO rejection letter, I told everyone that my senior year would amount to nothing more than a long nine month vacation and I wasn’t kidding.

First Semester

  1. Beginning Jewelry, Kvamme
  2. AP Calculus AB, Yernberg
  3. Advisory, Cox
  4. Beginning Painting, Tomney
  5. Classic American Theater, Colbert
  6. Empty
  7. Empty
  8. Lunch
  9. Empty

Second Semester

  1. Human Geography, Lanier
  2. AP Calculus AB, Yernberg
  3. Advisory, Cox
  4. Empty
  5. Lunch
  6. Empty
  7. Empty
  8. Web Design, Reinhardt
  9. Science Fiction Quest, King

All of the above is subject to change. Additionally, perhaps Calculus BC or Advanced Topics would be more interesting.

Posted in Education | Tagged classes, School, senior, year | Leave a response

PHP & JSON – Fatal error: Cannot use object of type stdClass as array

By Ryan on August 25, 2010

When working with JSON and PHP, things can get a bit tricky. One such situation might be decoding JSON data, which probably occurs more often than not in a web application.

A view of the fatal error in chrome's resource inspect through an ajax request

Fatal Error ...

I came across this fatal php error:

Fatal error: Cannot use object of type stdClass as array…

The cause was a json_decode call that I thought was entirely innocent.

Apparently, some genious thought it was a great idea to make the return value of the json_decode function be an object. It turns out that you have to explicitly state that you want an array.

$raw = json_decode($json); // bad way
echo( $raw["somekey"] ); // fatal error ...

$better = json_decode($json, true);
echo( $raw["somekey"] ); // no error!

According to the PHP.net documentation on json_decode, you need to set the second assoc argument to true so that PHP will return arrays.

That’s all there is to this silly error.

Posted in Error, PHP, Tips | Tagged array, Error, fatal, json, object, PHP | Leave a response

My First MooTools Presentation

By Ryan on August 25, 2010

On Thursday, May 27th, I gave my very first MooTools presentation to an eagerly awaiting AP Computer Science class. The presentation was in three parts, the first a general overview of javascript itself, the second a micro-guide to MooTools glowing finesse with elements, events and effects, and finally a complete section on MooTools classes to compared to those in Java.

An introduction slide for my first mootools presentation

The MooTools website, the MooTorial and the mooWalkthrough all made appearances, giving extra credit to the third as my own project.

The presentation in all was 54 slides and lasted about 52 minutes with a Q&A segment. The content in the presentation was in fact enough to get the class to work on a not-too-rudimentary project involving MooTools the next day.

The Presentation

AP Computer Science MooTools Presentation
View more presentations from Ryan Rampersad.

You can also download the PDF or the PPTX. (If I wasn’t poor, I would have used Keynote.)

Enjoy!

Posted in Javascript, Mootools | Tagged Javascript, Mootools, presentation | Leave a response

Auto-Mount Network Share on Ubuntu

By Ryan on August 18, 2010

For backup purposes, I needed to automatically mount a network share from a Windows computer on startup. I hoped that Ubuntu would make this seemingly common need to taken care of, but it’s not – there’s some work involved. So let’s get to it.

Step 1

Let’s ensure the things we need are installed already. Run these commands to make sure you have samba and smbfs:

sudo apt-get install samba
…
sudo apt-get install smbfs

It’s likely you have Samba already, and you probably don’t have smbfs, so that’ll be downloaded and installed for you.

Step 2

Make sure your sharing computer is actually setup to share. I’ve done this so many times – I thought I set a computer to share a folder and it wasn’t correct. On Linux, making a folder shared is normally enough, but make sure you do not allow guests as they’ll cause strange problems. Always login. Please.

If you’re going to be sharing from Windows, you’ll need to go into some advanced preferences. Let’s say you have a MyFolder and you want it shared. Right click and go to properties. Go to sharing. Don’t you dare click share, you must click Advanced Sharing… instead. Now click the check box and then hit the permissions button below. There should be an Everyone group already there, if there isn’t, you have a problem that’s out of this walkthrough’s scope. Anyway, if it’s there, select it and then click on the Full Control check box below. Once done, click on Ok, Apply and Ok and Ok again. You can close that now. You have shared your folder.

Finally, if you have installed the Windows Live Essentials, you will have yet another step. You may have installed the Windows Live Sign In Assistant with the essentials bundle – if you did, you’ll need to uninstall it. It may even just come with Windows, who knows.

Step 3

It’s time to edit your fstab file. I strongly suggest doing a sudo cp /etc/fstab /etc/fstab.backup for safety reasons.

Fire up your favorite terminal editor, but I’m using vim: sudo vim /etc/fstab. Move down a to some empty lines in the file. Get ready.

To mount your share, you’ll need to provide an address. I’ve only done it with host names, but apparently IP address work too. Then, you’ll also need a mounting point. My preference is /mnt/sharing_computer/share_name but it’s up to you. Then, you’ll need to setup the username and password. If you’re worried about having passwords in plain text, well, I’m trying to find a better way actually, myself.

Anyway, here’s the syntax:

//computer_name/share_name /mnt/sharing_computer/share_name cifs username=theusername,password=thepassword,auto,rw 0 0

Write that into the file with your details. Then save it. Now, go to your mounting location. You’ll need to make the directories you specified in the fstab. So if you did what I suggested, that would be, sudo mkdir /mnt/ryan-desktop/school-docs. Then you should be set.

But there’s one more thing. If you’re on Windows, or you going through an established Windows based network, you’ll need to look at your hostname. It seems to be case sensitive, so you’ll have to watch out for that. You might consider restart your linux machine now, after your fstab has been edited. Why? Well, you want to see if your share auto-mounts. If it does, great and if not – well, I don’t know. Maybe you missed something above or you’re unlucky. I can’t really help that much if things don’t work out, sorry.

I had a great deal of help in writing this, especially from Geekology, the Ubuntu forums, Linux Questions and of course Tux Files.

Happy sharing!

Honestly, I’m not a Guru, I hardly know what I’m doing half the time. These steps have worked for me in the past and they might work for you in the future. This was tested on and is still used on a Ethernet connected Ubuntu 10.04 machine. Your mileage will vary.

Posted in Linux, Tips | Tagged linux, networking, samba, sharing, Windows | Leave a response

Symfony Doctrine Documentation

By Ryan on August 11, 2010

I’ve been tinkering with symfony php framework for a while now. I wanted to know what methods and properties were attached to the special Table objects I had all over the place. I thought it would be easy enough to look up that documentation on the symfony documentation site, but that didn’t work.

So I did some googling and I found a public API of every single class within the symfony directory. And while it was helpful, I didn’t know if was new or not. I was looking for a symfony 1.4 marker, but didn’t see one. I even asked on Twitter.

It occured to me eventually though, that Doctrine is a completely different project. So the documentation would be there. Looking up the documentation for Doctrine_Table was incredibly easy when on the right site, of course. I commented on Twitter about this, but why doesn’t the symfony documentation make a note that some API docs are elsewhere. It would be kind of helpful.

Anyway, if you’re looking for the latest and greatest documentation for the version of Doctrine that symfony 1.4 is using, then look no further, you found it.

Happy symfonying.

Posted in PHP | Tagged doctrine, documentation, symfony | Leave a response

My Top 5 IB Calculus 1 (Mathematics 1) Tips

By Ryan on August 4, 2010

I love my first exposure to calculus. I had read minor snippets from various sources prior to taking my first calculus class, but I never really understood it completely. My junior year was jam-packed with the wonderful world of calculus, and your years should seriously be just as fun as mine was. Sure, it was tough at times, and somethings aren’t in your control, like your teacher, textbook or course layout, but you can certainly do things to make your experience rock.

An example problem solved by me one day in class

5 – Admit Openly What You Do Not Know

When you work alone, be honest with yourself: if you don’t know something, don’t pretend to know it. When you’re working with others, honestly tell them you don’t know something, you’re not very familiar with it, or that it’s a challenge for you. When you do that, you’re honest with yourself and with others. They can help you out. Encourage others to be the same, you can help them out with what they don’t know themselves.

I openly admit I have a hard time factoring polynomials. Seriously. I’m not ashamed either, I told everyone I worked with when it came up, and they helped me out. I was really good at other things though, like binomial expansions, so I helped out with that.

4 – Know when it is worth it to give up

A lot of people will say never give up! But that’s silly. Giving up is sometimes the best solution. If you’re facing the most impossible derviative you’ve ever seen, or you’re attempting to solve for x but just can’t seem to do it, give up. Come back later.

There were many times during the year. It was a late night when the snow and wind were howling, and I just couldn’t crack a problem. I was there for at least twenty minutes once, and I couldn’t. So I stopped, moved on, and went to bed after finishing what I could finish.

3 – Always try to understand what you did not understand

This goes in hand with #4. When you do give up, which is fine to do, you need to find out why it was so hard. How was that problem different? How was it harder than others? How can it be simplified and solved? Giving up for the time being is great, it’s fine, it’s honest. It’s productive. But then you need to figure out how to actually do it, when you have the resources: your friends and your teacher.

When you do find out how to do it, it still might be hard or confusing. Guess what, admit that you do not understand, like it, it’s hard for you, and you’ve arrived at #5.

2 – Practice, do not study

I always said to my friends that I never really studied. I insisted, though, that I practiced. I would come up with annoyingly complex problems that contained multiple elements of the topic at hand and previous topics and then solve them. I would ask my friends to solve them too, and help them out as they went along. It was a study group in a way, but I got my own practice by making my own problems that were much harder than anything that could be on any test.

In other words, you need to do this:

  1. Make up some really hard problems based on the current material you’re learning
  2. Write up solutions for those problems – if you find one is too hard for you, set it aside, you know you need to work on that one more later
  3. Get your friends to attempt to answer some of your problems
  4. Any problems you couldn’t solve yourself, focus on those with your friends

This is a team building experience too. Your friends can all make up difficult problems and practice them with you or alone. It’s easy to practice. It’s far harder to study, to read notes and read the textbook, and so on. Practice, don’t study.

1 – Pride yourself in knowing calculus

For the most part, you know calculus once in your life. You know it when you learn it, and then you forget. My parents forgot, most teachers either never took calculus when they were in high school or even in college or in fact, forget completely, and students might not ever make it into calculus. Your stamina and your dedication seriously matters if you want to make in calculus, or in any class for that matter.

Calculus for me open the doors to an unknown world of mathematics. I had an idea of what was behind that door, but I didn’t truly understand before knowing calculus. Enjoy that you know more than the average person, and use that joy to propel yourself even further in your mathematical endeavorers, to obtain knowledge that most people cannot even imagine.

Conclusion

My time with calculus was excellent: my friends and my teacher made a huge difference, but my own attitude and actions made a difference too. If I was not so open and honest, so willing to learn more and more and accept the joy from learning more and more, I would not have passed the IB Calculus 1 (Mathemaics 1) exam.

Have a good year in class!

Posted in Education, Tips | Tagged calculus, Education, math, School, Tips | Leave a response

Update Ubuntu via Terminal

By Ryan on July 28, 2010

I work on my ubuntu server remotely, so I’m never around to update it in person. Keeping up with updates is easy to do via the terminal though.

Ubuntu is updating in the terminal

Ubuntu is updating in the terminal

Assuming you’re either locally doing this on your server or already remotely connected to your server via ssh, you’ll need to run these two lines:

sudo apt-get update
sudo apt-get upgrade

The first will get any new packages since the last automatic cache refresh, and then the second will actually initiate the update. You’ll probably be probably be prompted if you seriously want to update too. Once you confirm, aptitude, the full name for apt-get, will go off and get all of those packages from their repositories and install them. That’s it.

Posted in Tips | Tagged remote, server, ubuntu, update, upgrade | 1 Response

Next »

Recent Posts

  • Logitech Performance MX Mouse Review
  • Why you shouldn’t use your debit card online
  • How The Apple Event Will Go
  • Senior Year Class Schedule
  • PHP & JSON – Fatal error: Cannot use object of type stdClass as array

Archives

  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010

Tags

Apple CakePHP CSS Error Firefox fluff friends fluff grabber Google Java Javascript Microsoft Mootools PHP review Tips ubuntu update Windows windows 7 Wordpress

Search

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
QC: