FamousPhil.com -- Home My Calendar Youtube LinkedIn Facebook MySpace Twitter RSS Blog Feed

Blog Navigation

Partners

Latest Activity

MySQL Singleton Classes in PHP and Python

Phil gives the source code for implementing a MySQL singleton class in both PHP and Python.



Posted on: December 28th, 2011 by Famous Phil

Sarah James was kind enough to provide a second guest post!  I’d like to remind my readers that none of the content below has been thoroughly reviewed by myself and may contain inaccuracies.  As an overall comment, although you can torrent over mobile broadband, be very careful about how much bandwidth (traffic / transfer usage) you use, most mobile carriers limit you to 5GB of data/month, and the ones that claim that it is unlimited data, they typically will kick you off their network if you consistently go above 5GB of usage per month (read the fine print of your contract if you don’t believe me).  Torrents are like leaches on networks and they will use all the available transfer capabilities of your connection, so on the typical 3G/EVDO connection at a typical 60KB/s (512kbps), you can easily eat through your entire monthly allotment (5GB) in approximately 24 hours (or much less if your connection is better than the average) if you forget to turn your download off at night.  Anyways, here is Sarah’s post.

Mobile broadband is a technical freedom that is right there at your fingertips. When you are using bit torrent with mobile broadband card, the download speed not only depends on your bandwidth but also on the number of seeders you are getting. You need to make sure that you very well know your broadband card and its bandwidth status in detail. Running below 54Mbps will not to be able to help you download with the speed you always wanted. One benefit with them is that it works very much like a DSL connection for around $60 a month. Cheaper plans are available with carriers.

What is Bit torrent?

Bit Torrent is a popular and useful way of downloading large files on the internet. In case you are planning to use Bit torrent on a regular basis, you must have a reliable broadband plan. This will encourage you to get the best from the file sharing platform. After downloading software, users are allowed to directly send and receive files. It’s the resource that shows the route to the file being searched.

Bit Torrent is an extensive peer to peer (P2P) file sharing communications protocol that distributes large amount of data to several users who are targeting to download same file at one point of time. Pieces of data are supplied to the new recipients by the original user that supplies downloading the file. This further reduces the cost as well as the burden on the uploader who uploads the original file and encourages the reduction of dependence on the original user who first uploaded the file. It is important to carefully select the broadband card plans so that you can use bit torrent with mobile broadband flawlessly.

Know the Risks – Minimize the Risks

There are several risks involved with the access of this technology. Here are some of the possible risks that you should be aware of –

  • Avoid downloading files into your “My Documents” folder. This should be done in order to avoid people from establishing a connection with your computer and peeping into the files and folders of your system.
  • Users should only be having access to your “Shared documents” where no sensitive and confidential content should be shared.
  • Have a decent firewall installed on your system in order to avoid Viruses that can damage your system.

Mobile Broadband Cards for Bit Torrent: Why?

Here are the reasons -

  • Mobile broadband cards provide 3G soon going to be 4G and this is reliable and faster technology at your service.
  • This technology is getting cooler and amazing year by year giving you easy and comfortable access to the internet.
  • It is now possible to have uploads and downloads simultaneously. Cards have a decent access to GPRS, GSM and Edge networking upto 7.2 Mbps download and 2.0 Mbps upload speeds.

With the help of EV-DO and HSPA you can get on the net at 3G speed. You will get 50MB (basic plans) or 5GB (Average plans) or unlimited mobile broadband plans. If you are a typical user you will download over 20MB of data for web surfing. BT usually works fine on 3s 3G for users! Clients like Torrent have an inbuilt anti-leech feature which will easily cap your download speed in case you have a slow upload speed.

For using Bit torrent, a 5GB plan would suffice most of your needs. For power users that go through and through, nothing less than an unlimited plan should work conveniently. Even if the plan is unlimited, ‘prohibited’ uses can easily get you banned by providers like Bit torrent. This is done so that you don’t eat up the entire internet for yourself!

Tags: , ,
Posted in Mobile Technology
|| No Comments »

Posted on: September 21st, 2011 by Famous Phil

Last week, I finally broke down and got an iPad.  I did this partially because I wanted a new toy, and partially because I wanted to find out what the hype is with this gadget.  I’ve had several recommendations saying that I should buy one from many friends in the past, so I finally took the advice and jumped head into a product that I probably wouldn’t have looked at without the positive encouragement.  The final piece that really motivated me to get this product was that I would like to learn to develop for it, and I’ve found that the only way to effectively develop for anything, denoted X, is to be an active user of X.

After a week with the device, it makes sense to finally make an unbiased review of it.  When I first got home with it, I was really impressed with the design of the packaging.  Only Apple would put the iPad into a backpack style bag that’s really durable to carry out of the store, in addition, the packaging for the iPad was also well thought out.  There were tabs that easily allowed it to be pulled out of the box (no turning the box upside down, etc to remove it).  So after the unpackaging of it, I plugged it in to find that I needed to install iTunes to set it up.  This has got to be one of the worst things about Apple products, because I cannot stand iTunes, it’s just so bloated, and I manage my music library through other means!  Anyways, I installed iTunes and accepted the license agreement.  I couldn’t do much else though because iTunes couldn’t connect to my AppleID account because I firewall my internal network very heavily (which is fine).  Accepting the license agreement was enough to get the device to work without a computer; I quickly enabled the 3g access through Verizon and signed into the Apple Store using the 3g connection.

My first impression of the 3g access on my iPad was a very positive one, I actually get a little signal on the Manhattan, NY Subway which most phones I’ve used don’t even get, and I think this is because the antenna on the iPad is bigger.  This signal is just enough to check email and such, nothing too demanding.  I also get roughly 1.7Mbps down, and .42Mbps up on the 3g connection which is quite good for a Verizon mobile connection (EvDO at least, LTE would be pretty crappy).  I also love the fact that 3g is built in… so there is no tethering or anything of that sort.  Unfortunately, there are a few downfalls to the 3g model.  The first is that it will cost more and there is no way to sign up for a long term contract to get a big discount on the device (unlike phones).  I was pleased to find that the 2GB mobile data plan was only $30/month, which is well within my price range and usage range.  There are several other plans as well that are just as great.  If I were to recommend an iPad to anyone, I would strongly suggest the 3g model, just because you can use it anywhere without having to worry about being within range of a wireless signal.

I bought the smart magnetic cover for my IPad because I figured it would adequately protect it.  Although it does that, it really helps make the unit more dirty, especially if you goto a restaurant and put it on the table, since the cover that touches the screen also touches the table unless you put it in that triangle stand arrangement.  For general movement, the cover does a good job at protecting the screen.  Looking back, I wouldn’t change the decision to get the smart cover, but I do need to look into a carrying case / solution for this iPad.  It is too big to carry in a pocket, but it’s too small to put into my laptop case, and that presents a problem.  I currently carry it around on my side everywhere, which isn’t awful, but does make me more of a target when annoying people ask for money on the streets (it is NYC after all).  I haven’t quite found the perfect solution to this yet, but I’m sure it will come with time and more exposure to my options.

Apple is known for their App Store, and I someday hope to make some apps that appear in it.  For now, I downloaded several apps that made sense for my particular usage of the iPad… I’m going to just briefly mention them now.  The first application I got was Outlook Mail Pro by Code Before Dawn, which was meant to give a very similar interface to Outlook.  It works well for mail because the interface is well thought out (perhaps a bit better than the default mail app’s interface), but I still prefer using the built in Mail Application support for Exchange when it comes to the calendar, contacts, and task list access.  I also bought the iTap RDP application for remote desktop; it saves passwords and allows several bookmarks to remote desktops.  I use this for connecting to my remote windows computer for Trillian instant messaging and handling other issues that only a true computer can do.  Over 3g, the speed is phenomenal for response times to clicks and such.  I also bought the Remoter VNC application which supports SSH, Telnet, VNC, and other remote access protocols.  Remoter uses Putty keys for authentication which is why I sprung for this application over its competitors, and so far I’m very happy with it.  Other free apps that I got were Facebook, speed test, Skype, yelp (restaurant ratings), and Sirus XM (online subscription required).  Remember that Skype and Sirius will use a lot of data, so I tend to use Wi-Fi when I use those apps.  I did try a video chat on the Skype application and I believe that it works better on my iPad than it does on my main computer!

I will now go onto usability of the iPad.  When I first got the iPad, I was concerned that I wouldn’t be able to get used to the keyboard.  Honestly, at first, it was difficult to get used to since there is no bump on the F and J keys (home keys), so you have to look down to place your hands.  It was also weird not being able to rest my hands on the keys.  Overall though, I did quickly adjust to it and even with big hands, I can type fairly well on the keyboard.  One thing I did notice is at first my hands would always drift away and hit the wrong keys, but somehow that has gotten far better, I’m not sure if Apple is doing error correction or if I’m just getting better at keeping my hands in a consistent position while typing.  The second usability issue was the limited nature of most Apple products; fortunately, I haven’t hit any of these limitations that I couldn’t work around (e.g. remote desktop).  So far, my iPad is quickly replacing most of my computers since I’m quite used to it now (I’m actually typing this up on my iPad).  The battery life on the iPad is great, I haven’t had a single issue with battery life, and the lowest I was able to get the percentage to was 65% remaining, and that was after a full day of using it while visiting several parts of Manhattan.  This segue takes us into a side topic about the maps application.  So far, the iPad tends to be more reliable than my phone when it comes to placing a dot on the built in map telling me exactly where I’m at.

Overall, I love how fast the iPad is to display anything.  Unlike other things I’ve used, I can usually click something on the iPad and it loads instantly with very little delay.  I really like this about most Apple products and I wish that other competitors (e.g. Android) could make similar advancements in speeds for embedded devices.  Oh well, I’m sure that Google and their partners are working on this, and all good things take time to perfect.

So there you have it!  Overall, I would recommend the iPad to anyone, but at the same time, I really do think that you have to take the plunge yourself to discover if it is right for you.  I took the chance (with a 14 day return policy), and I found out that I definitely have great uses for my iPad, and I’m quickly learning why others strongly recommend it.

As always, thanks for reading, and I hope to post more frequently now that things are settling down in my life and are starting to become the same old routine, just another day.  I have a few interesting blogs on business and high traffic hosting coming soon, I just need the time to thoroughly review what I’ve already written for them so that they’re as clean and concise as possible.

Also, in the near future, FamousPhil will be getting a new, professional design (mobile and full computer oriented!), so that is something that you can look forward to!

Tags: , ,
Posted in Mobile Technology, Personal, Technology
|| 2 Comments »

Posted on: May 26th, 2011 by Famous Phil

On August 30, 2009, I made a blog post about my x10 home automation system, but I didn’t really cover it in depth enough to satisfy myself.  Therefore, I decided to revisit the topic from that blog (which is here).  This blog contains a video detailing the system that I ended up with during my University experience.  I expect that my future home will be much more automated than this video shows.  In order to appreciate the video, I decided to write some content to supplement what I talk about in the video, which is below.

In 2009, I came up with the first version of my light control system.  This consisted of a clapper, a set of cheap computer speakers, and an audio recording of my clapping.  My original system used a web interface to have the speakers (connected to the web server / site) clap when I wanted the lights to come on.  This quickly became unmanageable since I couldn’t monitor the states of the lights without a webcam monitoring my room (and I wasn’t thrilled about securing a webcam in my room that could be hacked into).  This lead into X10 which has done wonders for me over the course of the past two years.

Its funny remembering back to when I first got an x10 system, because the x10 website doesn’t look like your average store, it looks more like an adult site with lots of flashy banners (ha ha).  I do have to admit, with x10, the initial impression was very deceiving for me, since their products are really good!  Anyways, moving on, My x10 system consists of a USB transceiver module (CM15A located here) which connects to my windows server that runs a WAMP (Windows, Apache, MySQL, PHP).  In addition, I have several lamp modules, appliance modules, and remote control wall switches (which wirelessly communicate to the CM15A).

As for the software, I installed the ActiveHome software onto my server (that came with the CM15A).  This software installs a few application libraries (dlls) which enabled programmatic access to the CM15A to send and receive x10 commands over the power lines ran in my apartment.  Using this api, I wrote a quick program that makes a command line based program that can run certain commands.  I have to note that ActiveHome includes a default command line executable, but this didn’t have all the functionality that I wanted, most notably output in HTML for my web interface.  With the executable I wrote, I simply have the apache web server run the command as a local user which sends the x10 signals over the power lines ran in my apartment.  I should note that I considered using ASP.net which could interface with the API directly, but at the time I wasn’t very familiar with ASP.net and I wanted to use PHP.  I didn’t use IIS because I didn’t have the time to go permissions hunting to figure out why PHP wasn’t allowed to run programs as a local user on the web server through IIS.  Luckily a standard WAMP install that included Apache and PHP worked out of the box with little configuration.  The WAMP that I used was Vertrigo.

For the IR receiver that controls my projector, I use a USB-UIRT that I found on Ebay (I didn’t feel like waiting the estimated 6 weeks at the time for a new one).  Fortunately, the executable program that was included could send and receive signals from the USB-UIRT that I required, so I wrote some PHP that invokes it for the commands I used.

In 2009, I mentioned that voice control would make its way into my system.  I have to admit that it did!  Unfortunately, it didn’t last long because of all the bugs that I ran into.  I used the Microsoft speech libraries with a program called SmartButler, which could listen for speech commands and run commands on my server.  I initially used a cheap computer microphone, but quickly found that the interference in the audio made commands very inaccurate, and furthermore, if I held a conversation in the room, my lights would act up!  I figured that a USB professional Condenser Microphone would fix the problem, so I quickly ordered one and integrated it into my system.  This did significantly improve the quality of my system, but normal conversations would still occasionally trigger some of my web control panel controls inaccurately.  The final straw that broke the camel’s back (and caused this system to get removed) was when my RA (resident advisor), Stephanie came into the room, said hello to me and my lights went out of control (since I didn’t train it for a higher pitched, female voice, I’d assume).  I’d like to approach this problem in the future when I get the time to do it properly, but until then, I’ve been satisfied with web control panels that both my smartphone and computer can access.

Finally, at the very end of my video, I took a moment to show my Linksys PAP Adapter (VoIP, Voice over IP).  This works through a service from voip.ms.  Voip.ms is a prepaid service for VoIP adapters that allows you to buy a phone number for a very reasonable price (even 800 numbers).  They also have really reasonable rates and really good control for those phone numbers.  I thought I’d provide a plug for them since they are really good.

I would like to add that the Linksys adapter required an unfirewalled IP address to work properly (for incoming calls) in my experience.  It does have a NAT mode for this situation, but the university firewall constantly crushed this mode.  To get around this problem (and allow my web server for x10 to work properly), I implemented OpenVPN on my network and pulled in several public IP addresses and left them unfirewalled.  This solution worked well for me at UB, and I documented it fairly well in my OpenVPN post.

With nothing more to mention on the topic, here is the video that details my light control system and some other stuff.

Of course, I made many bloopers in this video (I improvised a lot!), so I thought the bloopers video would be appropriate.  Warning, there is a little language in it and the audio isn’t exactly balanced.

Disclaimer: I was not paid to endorse any of the products above (and I’m never paid to do that!).  I like to think that when I make a recommendation, it carries a lot of weight with it, which it should!

Tags: , , , , , , , , , , ,
Posted in Hosting / Server Administration, Mobile Technology, My Site, Personal, Programming, Student Life, Technology
|| 1 Comment »

Posted on: February 16th, 2011 by Famous Phil

It seems like I buy a new computer at least once or twice a year because I have a problem with using outdated technology.  Typically, I don’t throw money at a computer that “looks” good (unlike many of my friends).  In matter of fact, I truly hate the typical question, “what computer should I buy?”  The reason for this is because I first have to figure out what the computer will be tasked with, and then, I have to learn what the latest technology is and if it is worth the cost.  It typically takes me a few weeks to a month to have a solid answer for this question.

Last summer, I was looking for a new computer to replace a 12” HP tablet PC that I owned.  I wanted the new computer to be mobile, have suitable graphics; processing power and much better battery life (the hour I got out of the tablet was worthless).  I settled on a netbook from Dell.  It did exactly what I needed although it lacked a big enough screen for any real usability.  I typically use my mobile laptop as a dummy terminal that connects to remote systems via Remote Desktop or SSH.  I used the netbook for a few months and told myself that I need something that better fits my requirements.  After a long search, typical PCs turned up nothing particularly interesting, although I typically require Windows 7 since a majority of my licensed software requires Windows.

I remember meeting up with some friends who are “mac boys” as I like to nickname them last October.  They showed me how great the Mac OS is, and I have to admit that some of the features they showed were nice.  This along with the fact that I wasn’t really knowledgeable about Apple convinced me to look into an Apple brand computer.  I’d like to bring to mind that up until this point, I had very little experience with Macs so I felt that to help aid my extensive administration knowledge, a Mac wouldn’t be a bad investment.  The final push that got me over the hill was the fact that the cheapest MacBook pro had really good specs for the price and I didn’t find any PCs that could compare to the specs of the MacBook pro with a similar size.

So around Thanksgiving of 2010, I got a MacBook pro 13” model.  Honestly, my first words when it arrived were “this machine needs windows now!”, and I proceeded to configure bootcamp (a way to run Windows natively on the Mac hardware).  Bootcamp was an interesting experience because it was so simple that I overthought the problem and ended up having to reinstall the Mac OS.  I’m still not entirely sure how I managed that, but command line utilities definitely aided the problems.  It is at this point when I realized why people really like Macs. Read the rest of this entry »

Tags: , , , , , , ,
Posted in Mobile Technology, Personal, Student Life, Technology
|| No Comments »

Posted on: December 24th, 2009 by Famous Phil

Wow, it has been a long time since I’ve posted here.  It is actually pretty sad since my goal was to post at least once a week on an interesting topic back before the fall 2009 semester began.  Anyways, now that the semester is done, its time to move on and start working in new plans for my site, I will probably disclose these tomorrow sometime since I don’t want my blogs to be too long anymore :P   I will also probably discuss the last semester sometime within the next few days… it was a rough semester!

Today’s interesting topic relates to my personal HP Laptop (Tablet PC – tx1000 series).  More specifically Microsoft Windows User Access Control (UAC) and the graphics card in it.  If you own any computer or laptop with an NVidia GeForce 6150 graphics card in it, this will be incredibly useful to you.  So, the problem is: does your computer dim the screen and take forever to come back up?

If so, I have a solution… but first some background into the problem. Normally with any new operating system, I normally wait at least a year before I consider running it in a production environment (I’m quite conservative).  My tablet originally came with Windows Vista about a year ago, and I threw Vista out the first day I got it to put Windows XP on it.  I would never consider running Vista on any of my computers because of its horrible performance!  Windows XP served me well, but Microsoft recently stated that they wouldn’t be supporting XP anymore.  This coupled with a few really good reviews of Windows 7 prompted me to try Windows 7 when I first got it.

Back in late August, I got my hands on a copy of the Windows 7 Release To Manufacturing (RTM) and I installed it.  To my surprise, it seemed much better than Windows XP ever could be.  There were a few bugs, but nothing that I wouldn’t mind suffering through.  Of these bugs, the only major annoyance was the Nvidia 6150 dimming the screen for UAC (User Access Control) prompts.  I will get to that in a bit, but first, I want to make something very clear.  Windows 7 is the first operating system that I have ever ran in a production environment without it being fully released!  Microsoft should be very proud of themselves for making me feel safe while running a possibly unstable Windows 7.

The Windows 7 update software is quite impressive because it also found all of the missing drivers on my tablet and installed them for me.  Out of all of the drivers, it also got the latest Nvidia graphics driver for my card.  Prior to the driver being installed, UAC prompts and key combinations such as ctrl-alt-delete popped up the appropriate screen immediately.  After the driver installed, the screen would dim and then go blank for a good 10 seconds before it would come back up.  Back in August, I found no good solution to solve this but it was the only annoyance I had, so I decided to stick with Windows 7 for the college semester instead of doing a 10 minute restore of XP.

Now that I’ve got some background and some time in to solve the problem, the solution to this problem was quite simple.  For some reason, Windows 7 scales your computer screen and this takes longer to dim it due to the scaling problem.  To solve this, all you need to do is right click the desktop and goto the Nvidia Control Panel.  Click the advanced button and ok it.  Goto the “change flat panel scaling” option and turn it off entirely.  Once you ok this, your screen will now dim quickly (and properly).

Hopefully this will help someone else out because it was a big annoyance to me for a long 4 months!

Tags: , , , ,
Posted in Mobile Technology
|| 4 Comments »

Posted on: June 20th, 2009 by Famous Phil

First I guess I should apologize for not posting anything in the past week here!  I really hate it when I have to ignore my own blog for more important admin business elsewhere.  The good thing is, I always manage to learn a lot of new stuff that I can easily share :)

Over the past week, I got a new server to host Microsoft Exchange which is a powerful email server from Microsoft.  Before you go all crazy on Microsoft (I know I typically do), Exchange is one of the few excellent products they make.  I am actually very hard pressed to find anything that compares to it that is open source and can easily run on Linux which 99% of  my hosting business up until now has ran off from.  Man, I never thought that I would say that :P

Read the rest of this entry »

Tags: , , , , , , , , , , , , , , , , , , , , ,
Posted in Hosting / Server Administration, Mobile Technology, My Site
|| 3 Comments »

Posted on: June 8th, 2009 by Famous Phil

In this post I’m going to detail my first week with the MagicJack. This device converts a USB port into a Phone Jack that is compatible with any landline phone that you might have around the house.  I will touch on clarity and ease of use.

Read the rest of this entry »

Tags: , , , , , , , ,
Posted in Mobile Technology, Technology
|| 3 Comments »

Posted on: June 7th, 2009 by Famous Phil

This is part 3/3 of my evdo quest for fast internet.  In this post I hope to explain the shortcomings of all of my available options for internet access and which one turns out to be the best.  I will be providing several screenshots of different internet connection methods to prove a point including actual ping trials.  I actually had to borrow a dialup account to do this and was sort of unsuccessful at obtaining a speedtest (so I had to borrow one).

Read the rest of this entry »

Tags: , , , , , , , , , , , , , , , , , , ,
Posted in Mobile Technology, Student Life, Technology
|| 6 Comments »

Posted on: June 4th, 2009 by Famous Phil

This is part 2/3 of my EVDO quest.  This is where I’m going to post pictures and detail my setup. I will also mention a few technical details of the different types of mobile internet and what is what.  This will focus mostly on the Verizon network.  My next blog will compare dial up, satellite, and evdo with in depth technical analysis.  Lets get into the details shall we?

Read the rest of this entry »

Tags: , , , , , , , , , , , , , ,
Posted in Mobile Technology, Technology
|| 16 Comments »

Posted on: June 2nd, 2009 by tiffanymdavis82

There was a time when people were thankful that the computer had shrunk considerably and they could carry them around more conveniently. And with the advent of the Internet, WiFi and mobile data plans, it was easy to stay connected. But then, the march of the Smartphones’ brigade commenced and you could now use your phone to do anything your computer could, and more as well.

It’s no wonder that these phones are extremely popular and that every single mobile phone manufacturer has introduced one or two models to get a piece of this well-paying pie. Some phones are costlier than most computers, but there is no dearth of takers for these gadgets in spite of their steep prices.

Although many people are quick to get their hands on the latest Smartphones as soon they hit the market, they usually have no idea of how to utilize them to their full potential. They’re finally relegated to being just phones, chic and sleek no doubt, but only phones all the same.

Some people load their phone with too many third party software and applications that are available as free downloads on the Internet. While this allows your cool phone to do even cooler things, it clogs up the memory and makes your phone more sluggish and slow. You may also see your phone hanging and crashing more often.

The key to using your phone more efficiently is to manage its memory. While some gadgets like the iPhone come with huge internal memories, others have limited on-phone memory capacities and are dependent on external storage cards to expand their holding capacity. Most users are not tech-savvy enough to change default settings that are on the phone and that store your Internet browsing history, temporary files and cookies in your main memory. Of course, you are asked where you want to save programs, so you can choose to do so on the memory card.

But if you use your phone to surf the Internet excessively, your internal memory gets really full and your phone starts to act up and become slower by the day. If you know your way around your phone, you could use the tips found here to shift your browsing history, cache, and cookies to your memory card and also enable future files to be stored on the card. The process involves creating file folders with the same names on your card and then deleting the ones that exist on your main memory.

If you’re not sure about your navigation skills (the problem with Smartphones is that they’re sometimes too smart to be understood fully), get someone who is not technologically challenged to help you out rather than risk ruining your phone.

A Smartphone becomes more interesting and intriguing the more you use it, so learn your way around it by taking some time to get acquainted with it as soon as you bring it home with you.

This post was contributed by Tiffany Davis, who writes about accredited online universities. She welcomes your feedback at TiffanyMDavis82 at gmail.com

Tags: ,
Posted in Mobile Technology
|| 1 Comment »