Archive for the ‘ Coding ’ Category

#hackUTOS June 2010

Ceiling Cat

Ceiling Cat

Ceiling Cat announces:

#hackUTOS is is happening tomorrow, Friday June 4th, at CoffeeConnection!

Here’s how it works. #hackUTOS is a gathering of the hacking inclined. There is a main project (ConMan) that is being hacked on for the purpose of volunteering for Utah Open Source Conference 2010. More details on ConMan in a minute.

If you are looking to generally gather with geeks then this is the premier event in June for your geekiness! We will be gathering at CoffeeConnection who has great caffeinated beverages for sale (as well as food) and we will be getting our Geek on.

Want to get your geek on, but can’t make it in person… we are going to be on IRC too! Find us on Freenode at #hackUTOS

If you are not interested in hacking on ConMan, we still encourage you to come on down! We want all geeks to come by and share in the glory of #hackUTOS. That means you can even bring your own project. Think of #hackUTOS as a Jelly or CoWork (for 1 night). Come share your project and your ideas, find people, network, and generally have a good time.

Now some details on ConMan!

ConMan is the Conference Management software used by UTOS for the UTOS Conference. It is written in Python, using the Django framework. It is hosted at GitHub and it is open to the public. If you don’t hack python do not turn and run just yet. We are in need of things besides python coding. We need folks who are willing to conceptualize, we need graphic designers to help make the app look pretty, we need people to help with bug reporting, and more. If you are reading this blog post you are more than qualified to come help us tomorrow (and at any other #hackUTOS event).

Alright… I am tired of typing, and Ceiling cat is starting to freak me out… see you at #hackUTOS

#hackUTOS March 9th, 2010

Hey everyone, it is time to #hackUTOS again!

What is #hackUTOS?

UTOS has been sponsoring Open Source technologies in Utah for years now. This is a chance for all the members (and potential members) to come out meet some of the UTOS hackers including herlo, utahcon, and DexterTheDragon.

We will be hacking on ConMan, the Open Source Conference Management system used by UTOSC! This is a great chance for you to participate, learn,teach, and get credit toward attending the conference for a discounted price!

When is #hackUTOS?

We will be meeting Tuesday March 9th, 2010 at 7:00PM MST.

Where is #hackUTOS?

Online

Along with meeting in person (details below) you can find us online in IRC. We are on the Freenode network in #utos-dev

IRL

Since the meeting place worked out well last time we will be meeting again at the Salt Lake Coffee Connection.

Located at:

1588 South State Street, Salt Lake City, UT 84115

The Salt Lake Coffee Connection is a really great place to meet. They have a great internet connection (provided by our good friends at Xmission), awesome drinks (check out the Dirty Chai!) and good food! The prices are good, and internet access is included with all purchases.

What Language?

ConMan is written in Python, using the Django framework. We run it on MySQL and SQLite databases.

Don’t know Python, or Django? Don’t worry, we are all open to helping you get started. Please realize we are here to mainly work on our project, we are happy to offer light support to get you up and running.

If you aren’t interested in working on ConMan bring your own Open Source project! We would love to have you in the house for some great co-working!

#hackUTOS

Hey everyone!

It is time to do it again. Our monthly #hackUTOS

What is #hackUTOS?

UTOS has been sponsoring Open Source technologies in Utah for years now. This is a chance for all the members (and potential members) to come out meet some of the UTOS hackers including herlo, utahcon, and DexterTheDragon.

We will be hacking on ConMan, the Open Source Conference Management system used by UTOSC! This is a great chance for you to participate, learn,teach, and get credit toward attending the conference for a discounted price!

When is #hackUTOS?

We will be meeting Tuesday March 2nd, 2010 at 7:00PM MST.

Where is #hackUTOS?

Online

Along with meeting in person (details below) you can find us online in IRC. We are on the Freenode network in #utos-dev

IRL

Since the meeting place worked out well last time we will be meeting again at the Salt Lake Coffee Connection.

Located at:

1588 South State Street, Salt Lake City, UT 84115

The Salt Lake Coffee Connection is a really great place to meet. They have a great internet connection (provided by our good friends at Xmission), awesome drinks (check out the Dirty Chai!) and good food! The prices are good, and internet access is included with all purchases.

What Language?

ConMan is written in Python, using the Django framework. We run it on MySQL and SQLite databases.

Don’t know Python, or Django? Don’t worry, we are all open to helping you get started. Please realize we are here to mainly work on our project, we are happy to offer light support to get you up and running.

If you aren’t interested in working on ConMan bring your own Open Source project! We would love to have you in the house for some great co-working!

Come Support Open Source!!!

Geek Lunch

Meet at the nearest location to you at 12:30pm this Friday, February 26, 2010.  If you have never been, look for the group with this logo at their table.  Geek Lunch is organized by the Utah Open Source Foundation, but you must pay for your meal.  We look forward to seeing all of you there.

When:

Date: Friday,February 26, 2010
Time: 12:30pm – 2:00pm

Where:

We have geeks all over Utah, and as such we like to spread the love to more than just 1 pub, so we have two (because Utah county is slacking) locations to choose from.

Salt Lake County
The Green Pig
31 East 400 South
Salt Lake City, Utah 84111
Website: http://www.thegreenpigpub.com/
Map: http://snipr.com/uhhox
Phone: (801) 532-7441

Weber / Davis Counties
Roosters
748 Heritage Park Boulevard
Layton, Utah 84041
Website: http://roostersbrewingco.com/
Map: http://snipr.com/uhizp
Phone: (801) 774-9330

Utah County
There is currently no place planned for in Utah county due to low turnout.  If you would like to help organize a Geek Lunch in Utah county, please email clint@utos.org.

ConMan Hack Night

Did you attend UTOSC last year? Are you going to attend this year? Did you like how the process to register and attend was super easy? That is all thanks to ConMan, the Conference Management software that the Utah Open Source Foundation created, and maintains.

If you want to make sure things stay smooth at the conference, and participate in an open source project then you are invited to come down and help us code the project to the next milestone!

Where:

Salt Lake Coffee Connection

1588 South State Street, Salt Lake City UT

Directions

When: 7pm – ??

You see the ?? means you can come and code as late as you want! The coffee house is open really late, and you are welcome to stay and code till they kick you out!

What:

So we get together each week to work on the project, cause we think ConMan can be the best conference management software ever! We simply would love to have some more people who love open source, and know python and django come down and contribute to the code base!

http://saltlakecoffeeconnection.com/map-directions/

PHP, Soap and WSDL Caching

Today I was offered a free lesson in how PHP handles Soap, and more specifically WSDL caching.

When you instantiate a PHP Soap Class you pass it a WSDL (Web Services Description Language) and it looks like this:


$client = new SoapClient('http://example.com/services/thescript.php?wsdl');

Depending on how your caching is setup, this will go out to the WSDL provided, pull in the document and store it in a cache. The default cache for PHP is 86400 seconds. If you are familiar with time in seconds you know that that is 24 hours. So by default you only actually read the WSDL once in a 24 hour period. Normally this is not a problem.

What is a WSDL?

For that answer let’s turn to the W3 site:

WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information.

So in English that means it is a map to the services provided by the provider. Basically you get a copy of the map, and follow the endpoints to the answers you need.

One basic function of this is that it tells you want methods (services) are available on your fresh client.

When WSDLs go bad

So today one of my providers, without warning, updated their WSDL. This wreaked havoc on my system because I had cached the WSDL on my side for 24 hours (remember, the PHP default). The change was a super simple change, a change in URL for a service, that’s it!

The problem was that since PHP had already read the file within 24 hours it didn’t care that there was a new file, that the URLs had changed, and so it continued to work as it had before.

The real problem wasn’t that the URLs changed, that would have been fine if the provider hadn’t shut off the previously reported URLs.

Turn off the cache

So you are left with two options when something like this happens. First, you can sit and wait up to 24 hours for the problem to fix itself. This was not an option for us. The second is to clear your cache and try again.

Now PHP (on Linux) stores the cache for the Soap WSDL in /tmp and I wasn’t sure which one of the many files was the actual cache for this particular provider so I decided I would have to tell PHP to not cache the WSDL and try again.

Into php.ini I went, located the soap.wsdl_cache_enabled flag. I changed it from 0 to 1


soap.wsdl_cache_enabled=0

I saved the file and restarted Apache.

The service continued to fail. I was perplexed. I thought maybe I flubbed the save so I opened the php.ini again located my line and it was fine. So I looked around there to see if maybe I missed another important flag. The only thing I could find was soap.wsdl_cache_ttl listed as the “(time to live) Sets the number of second while cached file will be used instead of original one” I promptly changed this to 0 as well


soap.wsdl_cache_ttl=0

Restarted Apache, and finally my script stopped failing.

I have since re-enabled my cache ttl and enabled flags, as reading the WSDL every time is a resource hog that doesn’t need to be in place.

The Lesson Learned

The lesson learned by all today is be aware of your caching, and be aware of the changes you make to your live/production systems.

SLLUG Daytime and Vim

Vim LogoI would like to give a big thanks to all the folks who attended today’s Salt Lake Linux User Group Daytime Special Interest Group (SLLUG Daytime SIG). We had a great time covering the basics of vi(m) and I think everyone walked away knowing something new.

I created my slides using Google Docs, so you can see them too!

I want to thank Joe Brockmeier, and Linux.com for the source material and here is a list of places you can find equally great (actually better) presentations and tutorials on vi(m):

Also to learn more about vi(m) read up on these:

There are thousands of other articles on vi(m) around the net, so if this doesn’t give you your fix, search Google.

PHP and Josso – Transparency Rocks!

Bogdan recently asked in my comments:

I can’t seem to find a call like josso_authenticate($name, $pass), returning an array to be appended to user’s SESSION. I was expecting such a method, because SOAP is already used everywhere, so it shouldn’t be too hard implementing this.

Has anyone had success implementing this kind of “transparent” login?

JOSSO simply doesn’t make it easy to log people in with a single call. Instead you need to make an interface to the API to do so. I just so happen to have an example of such a wrapper function.

Read more

Let’s Get Open!

Being that it is Monday and I am really not feeling it today I thought I would dig up what is happening around the nets and share with you.

Chrome OS Zero

Looks like Hexxeh has been hard at work getting a cleaned up version of Chrome OS called Chrome OS Zero out to the masses. Reading through the Wiki and FAQ things look pretty nice and clean. I may take a stab at playing with this in the next week or so. Thanks Hexxeh!

Droids

Tim at CTRL-ALT-DEL Comic has this silly for us today:

Thanks Tim!

Nexus One

We all know about Google’s latest move in the Android field by now, right? Well it looks like the Nexus One is selling well, and people are having problems with the 3G service that T-mobile is offering on the Nexus One. Being a T-mobile customer myself I can tell you the problems are not limited to the Nexus One. My phone refused to stay on 3G this weekend too, oh well.

PHP

References

Johannes Schluter discusses how references in PHP work, and suggests that maybe we should not use them anymore.

Last year I spoke at eight conferences and attended a few more multiple times at most of them I found myself in discussions about references and PHP as many users seem to have wrong understandings about them. Before going to deep into the subject let’s start with a quick reminder what references are and clear some confusion about objects which are “passed by reference.”

Patterns

Giorgio Sironi has two new blog posts about patterns in PHP. The first is on Abstract Factory patterns:

The major problem that creational patterns try to solve is that objects need collaborators: we often pass them in the constructor of a Client class to aid decoupling, as every class should know only what it really needs to get its job done. With the verb know I mean that they just know that the other part exist at all.

The second is on Builder patterns:

The Builder pattern’s intent is to encapsulate the details (the new operators and other wiring) of the object creation process under a common interface. Though, the Builder can actually change the internal representation of an object, as it is not a black box.

Both blog posts were great reads, and I suggest all my UPHPU buddies hit them up.

Coders At Work

Cover Art

Cover Art

I recently finished reading Coders at Work, written by Peter Seibel (@peterseibel), and published by Apress. What an amazing book to read, I can’t even begin to express how much I actually enjoyed this book, and I know I am gushing, but this was a real treat for me.

I have always been amazed by the past of computing, the idea of computers as large as houses, filling entire warehouses for simple punch card technology, hell punch cards! I love hearing the stories of how things were, getting the first networks going, writing the first program for any technology, making something that everyone everywhere now uses and doesn’t think twice about why it works the way it works.

In Coders At Work Peter Seibel interviews some of the legends of technology including Peter Norvig (Director of Research at Google Inc.), Jamie Zawinkski (major Mozilla contributor, @jwz), and plenty more.

Read more

Beginning Silverlight 2

Beginning Silverlight 2: From Novice to Professional

Beginning Silverlight 2: From Novice to Professional

In web development, it’s important to keep current on new and updated technologies to avoid falling behind in the field. As a designer-turned-coder, I enjoy reading about and following up on the latest tools available for design and interface programming. Having designed and programmed in Flash for almost 10 years now, I was excited to read this book and see how Microsoft was tackling Rich Internet/Interactive Applications.

The author, Robert Lair, starts out the book with an introduction to Silverlight and the benefits of building interactive applications using Silverlight and its related tools. After the brief introduction, the real work begins and the reader is quickly involved in writing Silverlight applications. Robert does a great job walking the reader through the various tools available while building each application, and each example builds on or incorporates the previous examples, effectively ‘stair-stepping’ the reader up to building their own Silverlight applications. Read more