Friday, January 23, 2015

The Internet will vanish, says Google's Eric Schmidt

Speaking at Davos, Google's executive chairman explains that we'll all be experiencing our digital connections as a seamless part of our everyday world.
Digitally speaking, we're not even plodding along yet.
Why, AT&T is throttling my data this month and my phone still won't work too well in half of California's Wine Country.

Thursday, January 22, 2015

PDO TUTORIAL SERIES 3

To continue our pdo tutorial, we will improve on our database class... if this is your first read, you can catch up:

1. Tutorial 1
2. Tutorial 2
3. Side Tutorial: Preparation for Tutorial 3

Ok, now you can continue.

I made the following changes to our database class:


1. I Created a constructor

(Further reading: http://php.net/manual/en/oop4.constructor.php,
 http://php.net/manual/en/language.oop5.decon.php )

2. I modified our database connect method, i named it open_connection(), so we can have another method, close_connection().

3. I Created  close_connection method

4. Instantiate the database class

My reasons:

1. So that each time i instantiate a new object of the database class (with the key word new), the open_connection method will be automatically called.

2. Just appropriate naming convention, so that our code can be easily understood by another developer and to avoid future confusion for yourself.

3. This method is for closing the database connection, although, leaving the database connection open has not been known to cause serious damage, but its good practice to close connection.

4. This way, we do not need to instantiate it again when we require the class. (keep reading you'll understand this)

Now, my modified index.php file


to test it, i made a little addition to my open_connection(), to tell me that database was successfully connected:

And here's what we have:
Now, to look closely at our close_connection method.

With PDO, it is not absolutely necessary to close connection, like i have said earlier... but i still prefer to do it. So, to close connection, you set it to null.


My index page again:



Our result:

NB: Method and functions are one and the same in PHP don't get confused.

In the next tutorial (next week), we'll improve on the database class and start taking note of some security features.

I hope this tutorial has been useful so far, drop a comment, question, correction, suggestion etc

Don't forget to share.

Good news for all, for the first time i'm making my code available... click here to download (ZIP)




Wednesday, January 21, 2015

GOOD NEWS FOR WINDOWS USERS: Windows 10 is a free upgrade for all 7 and 8.1 users


Windows 10 is freeeee
Wondering how much Windows 10 will set you back?

In most cases, nothing. Microsoft has announced that the new operating system will be a free upgrade in the first year for everyone using Windows 7, Windows 8.1 or Windows Phone 8.1.

The company sees Windows as a service rather than a product, Terry Myerson explains. Yes, Microsoft is partly following in Apple's footsteps (OS X upgrades have been free since Mavericks), but it's hard to complain about getting a big update for free.

Update: During a Q&A session after the event, Myerson promised that Windows RT users would get an upgrade to 10 as well. Your Surface 2 won't be left high and dry!

Find out new features of windows 10, here: engadget: Windows 10 new features

Source: engadget.

Tuesday, January 20, 2015

MEET THE 3 GUYS THAT HAVE BEEN PLAYING GAMES FOR 500 DAYS NON STOP

Think your seven-hour GTA V marathon session last night was a doozie? The residents of a house in Lakeland, Florida, would beg to differ.

As of Friday, the folks at StreamerHouse — which broadcasts on Twitch — have been playing games nonstop, every day, for 500 consecutive days. That’s more than 12,000 hours of continuous button-mashing insanity.

Launched a little under a year and a half ago by Ryan “Tree” Carmichael and two friends/roommates, the money raised from commercials and viewer donations has been sufficient to pay the bills and become a full-time (albeit low-paying) job for each.

THE 25 WORST PASSWORDS OF 2014

As it does every year, SplashData has published its Top 25 Worst Passwords ranking, revealing the most used and most predictable combinations of characters on the web in 2014.

Since the first edition in 2011, “123456” and “password” have consistently claimed the top two spots.

If you use any of these passwords, you need to create stronger password...

read:
Creating a secure password
 

The Top 25 Worst Passwords of 2014:

1. 123456
2. password
3. 12345

SHOCKER: Google Maps Engine could be quietly coming to a halt soon

Google Maps appears to have hit a bump in the road with signs that its Engine is starting to slow down.

As of today, the Internet giant is said to be halting sign-ups for the Google Maps Engine API, which was crafted to help developers build apps with data infused from Google's extensive global mapping platform.

As of Tuesday afternoon, the page was still live. Google has not responded to requests for comment yet.

Google Maps Engine itself is a service for storing geographic data and then layering that data on top of the Google base map. According to Google, the data can consist of "vector and/or raster (imagery) files."

There are approximately one million active websites and apps using the Google Maps API for custom-made, cloud-based maps.

The Google Maps Engine support will end on January 29, 2016.

CHEAPEST COUNTRY IN THE WORLD

I found this, and i believe its worth sharing...

It ranks 119 countries based on the Consumer Price Index - which takes into account the cost of groceries, restaurant meals, transportation and utilities.

I extracted the images, you can read the full news here:

telegraph









SIDE TUTORIAL: PHP OOP - SECURE AND RE-USABLE DATABASE CONNECTION

In preparation for our next PDO tutorial, i have decided to share this important piece with you...
I hope you find it useful.


BETTER WAY OF PERFORMING DATABASE CONNECTION

Personally, i prefer creating re-usable codes, i don't know of other developers out there.. but i'd rather not retype codes.. and so, while performing database connection i do it in a php file using CONSTANTS. That way i can change just the CONSTANTS, export database and all will work well for any project...

Monday, January 19, 2015

Mark Zuckerberg: Even The Smartest Genius Can't Start A Company Alone

Mark Zuckerberg thinks that the media's portrayal of what it takes to start a company often discourages people from trying to do it themselves. 

At  his most recent town-hall-style question-and-answer session , someone asked Zuckerberg to talk about "the exact moment" when he decided to build Facebook.

Zuckerberg laughed and then explained that the idea for any company doesn't come in one moment, but through talking and thinking about something for a long time.

He then added that one person's efforts are never enough. The media often simplifies what it takes to build a startup, he says, making it seem like it there's always one person with a genius idea who manages to build a great company.

Instead, he argues, you need a bunch of people working on an adaptive concept together for a long period of time. You don't need to be a prodigy to start your own cool company — you just need to be passionate and focused. Zuckerberg went as far as to say that the media's portrayal of startups actively discourages people from trying to create a business themselves.

"It's not as crazy and challenging as the media makes it sound," he said. "It's more accessible."

Source:
Yahoo Finance
Google