Feed aggregator

Chicago PHP First Met in 2000, Not 1997

Ben Ramsey - Tue, 28/07/2015 - 01:00
For many years, I’ve claimed that Chicago PHP held its first meeting in February of 1997. Unfortunately, I was wrong.
Categories: Not PHP-GTK

OUYA store API documentation

CWeiske - Tue, 30/06/2015 - 23:00
OUYA store API documentation
Categories: Community

Composer: Missing Distributions For Explict References

Ben Ramsey - Wed, 17/06/2015 - 23:30
I prefer to hard-lock Composer dependencies for non-distributed apps, including hard-locking to a specific commit. Today, I encountered a problem…
Categories: Not PHP-GTK

Composer: Missing Distributions For Explict References

Ben Ramsey - Wed, 17/06/2015 - 23:30
I prefer to hard-lock Composer dependencies for non-distributed apps, including hard-locking to a specific commit. Today, I encountered a problem…
Categories: Not PHP-GTK

Reflecting on PHP at 20

Ben Ramsey - Thu, 11/06/2015 - 22:30
In this post, I discuss my InfoWorld article, @phpc's timeline, #20yearsofphp hashtag, PHP cake, and community posts reflecting on 20 years of PHP.
Categories: Not PHP-GTK

Reflecting on PHP at 20

Ben Ramsey - Thu, 11/06/2015 - 22:30
In this post, I discuss my InfoWorld article, @phpc's timeline, #20yearsofphp hashtag, PHP cake, and community posts reflecting on 20 years of PHP.
Categories: Not PHP-GTK

20 Years of PHP

Ben Ramsey - Mon, 08/06/2015 - 13:00
Twenty years ago today, Rasmus Lerdorf released Personal Home Page Tools (PHP Tools) version 1.0 to the world. I first encountered PHP in early 2000…
Categories: Not PHP-GTK

20 Years of PHP

Ben Ramsey - Mon, 08/06/2015 - 13:00
Twenty years ago today, Rasmus Lerdorf released Personal Home Page Tools (PHP Tools) version 1.0 to the world. I first encountered PHP in early 2000…
Categories: Not PHP-GTK

Fun Recruiter Messages

Ben Ramsey - Thu, 28/05/2015 - 23:00
Earlier today in the #coderabbi Freenode IRC channel, we were discussing recruiter messages. I thought I’d share one of my favorite gems from over the years.
Categories: Not PHP-GTK

Fun Recruiter Messages

Ben Ramsey - Thu, 28/05/2015 - 23:00
Earlier today in the #coderabbi Freenode IRC channel, we were discussing recruiter messages. I thought I’d share one of my favorite gems from over the years.
Categories: Not PHP-GTK

Website Redesign

Ben Ramsey - Tue, 26/05/2015 - 14:00
I’ve fully redesigned my website and have added more content. In this post, I explain why and how.
Categories: Not PHP-GTK

Website Redesign

Ben Ramsey - Tue, 26/05/2015 - 14:00
I’ve fully redesigned my website and have added more content. In this post, I explain why and how.
Categories: Not PHP-GTK

Fixed broken links

PHP-GTK on Github - Mon, 25/05/2015 - 10:49
Fixed broken links
Categories: Community

My Failed Attempts at Soft Skills Talks

Ben Ramsey - Sat, 23/05/2015 - 21:30
In 2013, I began crafting soft skills talks as a return to the PHP conference speaker circuit, but I learned I wasn't suited to deliver these talks.
Categories: Not PHP-GTK

My Failed Attempts at Soft Skills Talks

Ben Ramsey - Sat, 23/05/2015 - 21:30
In 2013, I began crafting soft skills talks as a return to the PHP conference speaker circuit, but I learned I wasn't suited to deliver these talks.
Categories: Not PHP-GTK

Amazon Echo

Anant Narayanan's blog - Sun, 26/04/2015 - 01:00

I received my Amazon Echo recently. I ordered it merely as a curiosity and to generally stay aware of industry trends. But after just a few days of using it at home; I love it enough to prompt dusting off this blog after almost two years of no posts!

The first thing that caught my attention was the sheer accuracy of its voice recognition. The state of the art is already pretty good; the dual pillars of cheap, persistent computing power (i.e., “the cloud”) and renewed interest in machine learning brought us Siri (and their Microsoft & Google equivalents). In my experience, these have been accurate more than 95% of the time, a long way ahead from the days of offline speech recognition (à la Dragon Naturally Speaking). The bar is already high, but I’m comfortable saying Amazon Echo’s voice recognition is definitely better than Siri’s or Google’s.

I’m not sure how they pull it off. Maybe it’s not because of better software, but simply better hardware. The Echo has an array of 7 microphones that are always listening and wake up as soon as you say “Alexa”…

There is an element of genius in packaging it as a standalone cylinder that sits in a somewhat central location in your home. The experience of being able to talk to it, hands-free, from a wide range of places in your home sounds like it wouldn’t be that big a deal… until you actually do it. Then it makes having to find your phone, pick it up, and push a button to make it do something seem archaic and boring.

Now, the only problem is that even though Echo understands what I’m saying, it doesn’t always know how to respond. The companion app often shows an accurate transcription of what I said, but since it did not fall into one of the categories it’s designed to handle at the moment, I don’t get a satisfactory response.

But there are relatively easy ways to fix that. The Echo API is currently invite-only, like the ability to purchase the device itself. As more developers get their hands on it, we’ll start to see many interesting things happen. Some developers already hacked their way into controlling their home lighting (Amazon now officially supports integrations with Philips Hue). I’m itching to make it control my home theater system, currently riddled with half a dozen remotes.

The idea of having a single hub in your home that’s always listening and can control all your other devices is incredibly appealing to me. For one, it means that your TV, Xbox, Nest, and other home devices don’t have to build in (often bad) voice recognition systems themselves.

Finally, I was impressed by how handily the Echo passed Larry Page’s “toothbrush test”. Even with its somewhat limited functionality, my wife and I have already used it several times every day since we received it — for things ranging from compiling a shared grocery list, adding reminders, setting alarms, and playing music.

I think Amazon is onto something big. Priced at an aggressive $99, the Echo has the potential to make it into the living room of a large majority of households in the US (and the world, eventually). Will we now see a flurry of competitors from tech giants and startups?

Exciting times!

Categories: Not PHP-GTK

The Hack vs. The MVP

Crisscott - Mon, 10/06/2013 - 18:42

We build lots of features for GSN.com. We do that with a surprisingly small number of folks. Our users play tens of millions of games on a daily basis. Our team consists of one designer, a product manager, four developers, two QA folks and a couple of Ops people. There’s a lot to manage and improve for those ten folks. That means we often have to make trade offs in order to get stuff out to production.

During a recent feature discussion session, we were debating whether we should go quick and dirty or build something “the right way.” I reiterated that the team was responsible for the end deliverable and that they have to stand by the decisions they make. I explained that they were empowered and required to do what they think is best for the business. Sometimes quick and dirty is the best way; sometimes it isn’t. One of the developers on the team had this to say, “I am trying to figure out when we do MVP and when we don’t.” That comment was innocent enough, but it really struck me.

The engineering team here at GSN had associated MVP with quick and dirty. Unfortunately, I suspect this isn’t unique just to our team. I suspect this comes from a deep seeded misconception that the basic principle of an MVP is about saving time. Additionally, there is a related misconception that a hacking something together saves time. Neither of these are really true.

The MVP

The idea behind building a minimum viable product is to ensure that you and your team focus on the right things. It is a big waste of time to build something that people don’t find valuable. Building an MVP is a way to create a product that has just enough features to be able to tell if users will ultimately find enough value in your product to use it. If you spend six months building the most awesome and complete piece of software the world has ever seed, but users don’t really have a need for it, you have wasted six months. However, if you spend one month to build just enough of a product to get users’ feedback and subsequently determine that your users have no need for an integrated cheese making schedule, you have saved significant energy and money.

An MVP is about features, not speed to market. You build an MVP because you can never be sure what your users want or need until you get something in their hands. You do not build an MVP because you are pressed for time. Determining what features go into your MVP is not done by looking at a schedule and seeing who is available to do the work. Feature sets are determined by looking critically at the plan and deciding if each individual feature is truly required to gauge the product’s value.

The Hack

Hacking something together is all about saving time (in the short term). To say that you have hacked something together says nothing of the features set. It does not mean that you have left things out or that you have determined that a specific feature isn’t really necessary after all. A hack is all about short term turnaround on delivery.

Hacks typically come at the cost of long term maintainability. In our conversation a few weeks ago, the discussion centered around whether we added a few if statements to existing pages (the hack), or took the time to break things down into more manageable and interchangeable chunks (the “right” way). We had a short window for delivery and we knew that the interchangeable chunks approach, while not an overly complicated task, would take more time. Both solutions however would provide the same feature set. Our decision was not “MVP or no MVP.” It was “hack or no hack.”

Conclusion

In the end, we decided to go the “right” way. We had enough time and we knew that the investment in cleaning things up now would pay off the next time around. More important than what we ended up implementing, however was coming to a consensus on how we wanted to build software. We want to build small and test things out before we put too much time and effort into a product, but we also want to invest in our future now. Sure, there may be times when we decide that a hack and the “right” way are the same thing. We may do things quick and dirty in order to get stuff our the door, but we will come back to them quickly and clean them up. Our rule can now be summarized as: MVP always; hack it as a last resort.

Categories: Community

Why I love WebSockets

Crisscott - Mon, 25/03/2013 - 23:01

When I was in school, passing notes took some effort. First, you needed to find a piece of paper that was large enough for your message, but small enough that it could be folded into the requisite football shape. Next, you had to write something. Anything smaller than several sentences just wasn’t worth the overhead, so you had to write about half a page’s worth of stuff, or draw a picture large and detailed enough to make it worth it. After that, you set about the process of folding your note into the aforementioned form. Finally, you had to negotiate with your neighbor to get the note from your desk to its final destination. All that was just to send the message. On the receiving side, the note was unfolded and read. Then your counterpart would go about constructing a response, refolding the note, and negotiating the return trip.

http://www.flickr.com/photos/kmorely

Passing notes in class was a task that required effort, skill and time. You sent a message and you waited for a response. If you thought of something new that you really needed to say, you had to wait until the response came back. At that point, you could alter your original message or add new content. While your note was in transit or being read and replied to on the other end, you had no control. You were at the mercy of the medium over which you were forced to communicate. Note passing simply isn’t designed to allow for short, quick, asynchronous communication.

Nowadays, kids just text each other on their smartphones. They send messages quickly and easily without having to invest in all that overhead. After a bit of upfront work to get someone’s phone number, the back channel classroom chatter flows freely. That is, until someone forgets to silence their phone and the teacher confiscates everything with a battery.

Just as the methods of slacking off in school have evolved, so have methods of communicating over the Web. HTTP is the note passing of the Internet. It works well enough for most communications, and when the message is large enough, the overhead is minimal. However, it is less efficient for smaller messages. The headers included by browsers these days can easily outweigh the message body.

Also, just like note passing, HTTP is synchronous. The client sends a request and waits until the server responds. If there is something new to be said, a new request is initiated. If the server has something to add, it has to wait until it is asked. It can’t simply send a message when it is ready.

WebSockets are the smartphone to HTTP’s notes. They let you send information quickly and easily. Why go through all that folding when you can simply send a text to say “idk, wut do u think we should do?” Why use 1K of headers when all you want to know is, “Did someone else kill my rat?” Better yet, why ask at all? Why not have the server tell you when the rat has been killed by someone else?

WebSockets are made for small messages. They are made for asynchronous communications. They are made for the types of applications users expect these days. That’s why I like WebSockets so much. They let me communicate without overhead or rigorous process. I can write an application that is free from request/response pairs. I can write an application that responds as quickly as my users can act. I can write the applications that I like to write.

Categories: Community

D is for Documentation

Crisscott - Sat, 02/03/2013 - 16:07

Code is the way in which humans tell computers what to do. Lots of effort has gone into making code easier for humans to read in the form of high level languages like Java or C++ and scripting languages like PHP, Ruby, and Python. Despite mankind’s best efforts, writing code is still clearly an exercise for talking to computers. It has not evolved to the point where talking to a computer is as easy and natural as talking to other people.

That’s why documentation is so important. Programming languages are just a translation of a developer’s intent into something a computer can execute. The code may show the computer what you intended for it to do, but the context is lost when another developer comes back to it later. Computers don’t know what to do with context. If they did, the days of Skynet would already be upon us. Humans can process context and it makes the process of dissecting and understanding a computer program much easier.

I find it both sad and hilarious when I see a speaker evangelizing code without comments. Invariably, the speaker shows a slide with five lines of code and spends ten minutes explaining its form and function. Even the simplest and most contrived examples from some of the foremost experts in the field require context and explanation.

When a bug decides to show itself at three in the morning, in code that someone else wrote, context and intent are two very powerful tools. When bugs are found the question, “What was this supposed to do?” is more common than “What is this thing doing?” Figuring out what it is doing is easier when you have good log data to go on. Knowing what it was supposed to do is something only the original developer can tell you.

If you aren’t aware of the concept of Test Driven Development, I strongly recommend you dig into it. In summary, tests are written before the code to ensure that they code matches the business requirements. I would like to propose a complimentary development driver: Documentation Driven Development. By writing out the code as comments first, you can ensure that the context of the development process will be captured. For example, I start writing code with a docblock like this:

/** * Returns the array of AMQP arguments for the given queue. * * Depending on the configuration available, we may have one or more arguments which * need to be sent to RabbitMQ when the queue is declared. These arguments could be * things like high availability configurations. * * If something in getInstance() is failing, check here first. Trying to declare a * queue with a set of arguments that does not match the arguments which were used * the first time the queue was declared most likely will not work. Check the config * for AMQP and make sure that the arguments have not been changed since the queue * was originally created. The easiest way to reset them is to kill off the queue * and try to recreate it based on the new config. * * @param string $name The name of the queue which will be used as a key in configs. * * @return array The array of arguments from the config. */

Next I dive into the method body itself:

private static function _getQueueArgs($name) { // Start with nothing. // We may need to set some configuration arguments. // Check for queue specific args first and then try defaults. We will log where we // found the data. // Return the args we found. }

After that, I layer in the actual code:

/** * Returns the array of AMQP arguments for the given queue. * * Depending on the configuration available, we may have one or more arguments which * need to be sent to RabbitMQ when the queue is declared. These arguments could be * things like high availability configurations. * * If something in getInstance() is failing, check here first. Trying to declare a * queue with a set of arguments that does not match the arguments which were used * the first time the queue was declared most likely will not work. Check the config * for AMQP and make sure that the arguments have not been changed since the queue * was originally created. The easiest way to reset them is to kill off the queue * and try to recreate it based on the new config. * * @param string $name The name of the queue which will be used as a key in configs. * * @return array The array of arguments from the config. */ private static function _getQueueArgs($name) { static::$logger->trace('Entering ' . __FUNCTION__); // Start with nothing. $args = array(); // We may need to set some configuration arguments. $cfg = Settings\AMQP::getInstance(); // Check for queue specific args first and then try defaults. We will log where we // found the data. if (array_key_exists($name, $cfg['queue_arguments'])) { $args = $cfg['queue_arguments'][$name]; static::$logger->info('Queue specific args found for ' . $name); } elseif (array_key_exists('default', $cfg['queue_arguments'])) { $args = $cfg['queue_arguments']['default']; static:$logger->info('Default args used for ' . $name); } // Return the args we found. static::$logger->trace('Exiting ' . __FUNCTION__ . ' on success.'); return $args; }

The final result is a small method which is well documented and little if any extra time to write.

Armed with data from logs, unit tests which ensure functionality, configurations to control execution, isolation switches to lock down features, and contextual information in the form inline documentation, the process of finding bugs becomes easier. LUCID code communicates as if it were a member of the development team. It does all the things you expect from a coworker. It talks, it makes commitments, it works around problems and keeps a record of both what it is doing and why it is doing it.

Categories: Community

googleMaps plugin for Joomla 1.6

KKsou Blog - Thu, 24/02/2011 - 02:03

For the googleMaps plugin users, the native version for Joomla 1.6 is now available!

Download: googleMaps v1.6

Syndicate content