Mashable Interview

I was fortunate enough to be interviewed on Mashable by Jolie O’Dell recently, cited as a “PHP expert” :-)

Here’s a full transcript of the original email interview, some responses make more sense in context:

Am running a bit behind but here are my answers for your interview, please let me know your feedback and if this gets published:

–What advice would you give to a developer just starting to learn PHP?

– keep on top of best practices including a healthy approach to security
– read the code of seasoned devs, there’s always a better/cleaner way to do things
– ensure your code is human readable, if you can’t understand it 6 months later, how will it be for other devs
– always try and simplify your interfaces, it’s much more difficult to write simpler code but consistent refactoring will save you a lot of time and headaches when it comes to maintenance
– don’t reinvent any wheels, you will always have more than enough to program, use reputable libraries whenever you can avoid writing the code yourself
– read up on some of the great programmers (eg: http://www.codersatwork.com/) and find out how they stayed passionate about the art of programming so many years later

–In your opinion, what’s PHP’s biggest strength? Biggest limitation?

I think it’s easier to start off with its biggest limitation first: so many people criticise PHP that you’d be tempted to think it’s a rubbish language; that couldn’t be further from the truth. The biggest limitation is _aspects_ of PHP are easier to learn than comparable aspects in other languages, so PHP attracts a lot of “developers” who don’t have a clue, write horrendous code, show their ignorance in forums and generally dangerously decrease the signal to noise ratio for the rest of us.

When I first started with PHP in 2000 I remember discovering of project by a German developer that struck me as very well designed yet according to the critics this should have been impossible:
– it was done in one of the earliest versions of PHP4 (4.0.0, released in 22 May 2000, http://php.net/releases/index.php) yet still displayed all the sophistication of someone who understood software engineering
– the language itself supposed had all sorts of limitations and defects that meant using it for OOP was technically impossible: wrong

See for yourself, still not updated since 2000 and still probably better than most PHP that gets written today:

http://www.phpdoc.de/

The point is a simple one: if you’re a developer who has the discipline to learn about software development, PHP can be an excellent tool.

The strengths of the language are simple and obvious:
– it stays close to its C roots while removing some of the unnecessary pain points like memory management, pointers and the compile cycle
– the OOP implementation is simple, elegant and easier to read than its peers
– the Java mantra of “complexity at any cost” is nowhere to be found, concise method names are used throughout
– libraries and extensions exist for pretty much every technology on the planet
– hacking activity and community participation most likely the highest of any programming language

There are however a few difficult situations that are directly linked and result from the above positive list:
– there is too much choice when it comes to selecting a library or framework to work with, and the information available is often biased and unreliable (posted by teenagers) so a lot of time can be wasted searching for quality
– the core development team is somewhat hysterical and not professional at times which has resulted in backwards compatibility being broken often, and in unacceptable ways, and our current namespace implementation
– there currently isn’t any decent IDE for PHP, not something comparable to what’s available for Java. This became increasingly obvious when I got into Objective C and Mac development, Xcode really sets the standard. A new candidate that seems promising and is non-free is PHPstorm, so far I’ve found it a relief to use compared to Netbeans. Eclipse, on the Mac at least, I don’t think is even in the race.

–For more intermediate or advanced PHP devs, what are some tips that have helped you along the way?

One of the key problems with PHP is the absence of any authoritative standard library, something which is literally taken for granted in Java, Python, Ruby, Perl and others. PEAR could have been it, but Zend chose to fork for political reasons, now we have the Zend Framework which is not really a framework but more like a library, and it still has some serious quality consistency issues. It seems ZF will likely become the dominant PHP library, but work still needs to be done by the community to refactor the “frameworky” libraries, ie, those that have dependencies on Zend_Config, Zend_Registry, etc. Documentation for many of the ZF libraries is flaky and incomplete, often the comments contain the clues you need to get things working.

In terms of tips, I’d make the following suggestions for devs who are keen to move out of beginner status:
– don’t be afraid of using an interactive debugger, available in decent IDEs like PHPstorm and also Netbeans and Eclipse if you have the patience, this is the best way to understand what the code is doing. If you’re using print_r($foo) you’re a beginner.
– don’t be afraid of unit tests, not only will you have an easier time maintaining your codebase, but often unit tests are the best form of documentation for a codebase, and will allow new devs to get up to speed fast
– use some of the available static analysis and IDE tools to help you refactor your code, good code is not subjective!

–What’s the best app or most clever hack you’ve seen that uses PHP? (Links, please!)

Facebook? Although from the code leaked a few years ago, the quality was primitive.

Pandora Gadget (Vista/Win7)

I use a couple of Windows’ desktop gadgets for easy access to some frequently used tools; my favorite is Pandora’s desktop gadget. I listen to Pandora at work, at home, and on my HTPC. I get a ton of use out of this gadget and it makes listening to music seamless. Also, NO ADS!

1. The first step before downloading the gadget is signing up for an account if don’t already have one: Register Here

2. The next step is to make sure you have Adobe Flash installed for Internet Explorer: Download here

3. Download the Pandora desktop gadget here.

4. Sign in with your account

Move the gadget anywhere on your desktop (Sidebar only on Vista) by clicking and dragging in the upper right hand corner.

Enable the gadget to always be on top / adjust opacity by right clicking on the Pandora text at the top of the gadget.

*Pandora lets free account listeners listen to up to 40 hours of music per month. I surpass this limit quite often so i bypass this by having multiple accounts with different email addresses (Shhh don’t tell).


Windows HomeGroup

Anonymous asked:

“Is it possible to network a Windows7 Computer and a Window XP with Window 7 being the main one?”

Yes, Windows 7 makes this process very simple with a new feature called Homegroup. For this post I’m going to record a screen capture video on how to use HomeGroup:


Backup your PC!

There are two types of people: Those who have had a hard drive crash, and those that it will happen to one day. I was a victim of the former and consequently lost everything on my laptop hard drive. The average PC user is uneducated that this can be remedied by backing up your hard drive. Of course we can’t prevent a hard drive from mechanically failing because they have moving parts and will eventually fail. However, the data that is on the drive is more important because unlike the hard drive itself, it cannot be replaced. There are many method’s for backing up a hard drive; I will cover the methods in which I find to be the most user-friendly and effective. 


*Their are many other options such as NAS, RAID, home server, etc. that I will not cover in this post.




Online Backups
Pros-Cheap upfront cost, easy configuration, no physical damage can be done.
Cons-Reoccurring costs, VERY slow initial setup (can take days or even weeks), Trusting that your data is secure.


Mozy.com– This option is completely automated, has unlimited storage and is decently cheap at only a couple dollars a month. Search google for mozy coupons and you’ll find 15% off one otherwise, it’s $4.95/month. Mozy also makes restoring very easy. You can download your stuff or pay for a hard copy to be sent do you. Also, if you are worried about your data being seen by others, you can set an encryption key.


CrashPlan– This is more a free backup software than an online storage backup provider. Its strengths focus more on providing different way to backup your files to different locations like to other computers, external hard drives, or your friends Computers. However, if you want to use their online storage it will cost you $4.50/month to upgrade. Encryption of your files is a little less secure with CrashPlan because you will need to upgrade in order to get 448-bit encryption.


External Hard Drive-
Pros-No ongoing costs (unless it fails), High-speed USB file transfers, internet not required.
Cons-Hard drive failure/physical damage, Higher upfront cost (although hard drive prices have come down rapidly).


To figure out just how much hard drive capacity you will need:
1. Go to “my computer”
2. Note the capacity of your hard drive/ drive you would like to back up 
*If you’re using XP Right click on the hard drive you would like to backup and choose properties. 


When in doubt purchase the higher capacity, it’s cheap.


I purchase all of my hard drives off of Newegg.com. They have great return policies, amazing customer service, and most of the time offer the cheapest prices around.


I recently purchased a 120gb external hard drive for my family’s PC that cost only $20.


I recommend using a Mirror Backup program. Besides backing up your files, these programs backup your computer’s operating system and all of your programs. This way you won’t have to reinstall the operating system and all of your programs if your hard drive crashes.

Most of the time the external hard drive will come with backup software.  Windows XP, Vista, and 7 also comes with a backup program. Click on your operating system for directions.


Google Chrome Extensions

I use multiple browsers (Firefox, Chrome, Safari, and Opera) but lately my browser of choice has been Google Chrome. I like it for many reasons including simplicity, speed, and security. To supplement Chromes already likable features I like to add extensions. Google makes this process very easy and can be done by going here

Some of the extensions I use:

To customize the appearance of Chrome check out the theme gallery.

Try them out and if you don’t like it just uninstall it.



Basic Browser Keyboard Hotkeys to Improve Productivity (Windows)



I like to use the keyboard as much as possible because I find it to be faster than pointing and clicking the mouse/ track-pad. It may take a while to get used to keyboard hotkeys but you’ll be thanking me later. Here is a list of some browser hotkey’s I personally use:
Ctrl + T – Opens a new tab in your browser
Ctrl + N – Opens a new window
Ctrl + Tab – Navigates through tabs left to right(Hold Ctrl and tap Tab)
Ctrl + Shift+ Tab – Navigates backwards (right to left)
Ctrl + Page Up/ Page Down – Navigates through tabs Left/Right
Ctrl + (1, 2, 3… n) – Goes to the specific tab number
Ctrl + W – Closes tabs/ windows

Youtube Videos:
F5 – Skips commercials at the beginning of the video
Spacebar – Play/pause
Up Down Arrows- Adjusts volume
Left Right Arrows- Fast forward/ rewind

Test it out on the video below!

*Again, these are just a few hotkeys that i personally use. There are many, many more.


CCleaner – Optimization and Cleaning – Free Download (Windows)

CCleaner – Optimization and Cleaning – Free Download


CCleaner is one of my favorite easy to use cleaning tools. It will clean up many browser files from IE, Chrome, Opera and Firefox like history, temp internet files, cookies, and many others with one button to click. It is totally configurable.

It also has a registry cleaner to clear out junk.

It securely deletes (wipes) the recycle bin files for a maximum up 35 passes. Dept of Defense is 3 passes. Each pass overwrites the file into obliteration. You find that in Options > Settings.

It has a easy uninstaller tool for unwanted software as well, much easier than windows.

Try it out!


MS Config (Windows)

If your computer runs slow during start up i recommend using MS Config to decrease programs that Windows starts automatically when you boot your computer. Here is how:


1. press the windows key + R
2. In the pop up box type in “msconfig” and click enter
3. Click the startup tab
4. disable only those programs that you recognize and don’t need to have running all the time. When in doubt, leave it on. 





















*Another solution is a program called Soluto. It makes the process more user friendly if you aren’t comfortable doing the above.


AlternativeTo

The only software I personally purchase is Microsoft products. There is usually a good alternative to paid software. I’ve found alternativeTo to be very helpful when looking for an alternative or just browsing for useful software that i could benefit from.