skoop.dev

  • About
  • @skoop@phpc.social
  • Formatting valid xs:dateTime fields with PHP

    September 8, 2009
    datetime, php, validation, xml, xsd

    After quite some time puzzling on the issue I decided to just fire off my problem to Twitter.

    Question

    Awesome as Twitter is for these kinds of things, I had my answer very soon:

    Answer

    Apparently the DATE_ISO8601 is missing the “:” in the timezone offset, and the solution is very simple:

    date(‘c’ );


    According to the PHP manual, the ‘c’ string also gives the ISO 8601 formatted string. However, this one is correct and working. Thanks to David Zuelke for giving me this answer, as it ensured my progress in this specific task 🙂

  • Speaking at PHPNW 09

    September 7, 2009
    conferences, ezcomponents, frameworks, pear, php, phpnw, symfony, zendframework

    Last years speaker schedule was quite nice and this year again the organization has come up with a great list of speakers. The list includes (amongst others) Derick Rethans, Scott MacVicar, Michelangelo van Dam and Lorna Mitchell. I am very much looking forward to attending some of the sessions.

    My own talk is a brand new talk on integrating symfony and Zend Framework. People who know me a bit will be aware that even though I am mostly a symfony advocate (and involved in that project), I very much like the Zend Framework as well because of it’s ease of use of individual components. Many people currently still believe though that you will have to make a choice for a single framework. In my session, I hope to convince people that you should not pick either symfony or Zend Framework, but you should go for the best of both worlds. This means integrating Zend Framework components into your symfony projects, but it can also mean integrating symfony components into your Zend Framework project. And though in my talk I will be limiting myself to these two frameworks, there is no need to stop there. There’s some excellent other frameworks (ezComponents, PEAR, and much more) that you can use to your advantage.

    So if you’re in the area, you should definitely come to PHPNW09. And even if you’re not in the area, it is definitely worth your time and money. The conference is not very expensive either, and plane or train tickets to Manchester are also quite affordable. So there’s no excuses anymore! I hope to see you there!

  • symfonyDay Cologne 2009

    September 5, 2009
    cologne, conferences, php, sfdaycgn, symfony, symfonyday

    My trip started on thursday night, when I boarded the ICE to Cologne from Utrecht. Now, the ICE is a great way to travel as I’ve experienced before and this was no exception. I was able to work on my workshop a bit more, and before I knew it I arrived in Cologne. There I was picked up by Andreas, one of the people from the organization, to go directly to the pre-conference social in a pub where apparently even Bill Clinton had come by some years ago. There we had a few beers and I talked with a few of the organizers and attendees that have come to the social.

    After the social we took a walk to the hotel. It was perhaps a 20 minute walk but we saw some great things such as the cathedral, a bridge that was full of locks (apparently lovers put a lock on that bridge and then throw the key in the river as a proof of their love) and also the conference location. It was a great walk, but when we got to the hotel I was also happy to simply sit down. I had to finish my workshop, so it was quite late before I actually went to sleep.

    The next morning I met up with Jonathan Wage (of Doctrine fame) for some breakfast. Later on we were joined by some of the other speakers but I didn’t stick around for long because I wanted to check out the conference location and workshop setup. Now the conference location was simply awesome. It was the top floor of this huge building on the side of the river. It gave you a great view over Cologne on all sides! We put together a nice setup for the workshop and as the first people started coming in, it was time to take it easy for a bit.

    The workshop itself went very well. I took the attendees through the development process for a simplified version of Dzone/Digg (or Mr Wong as it is apparently called here in Germany). From what I could gather people were easily able to pick up on the concepts and were happy with the way I put across the information. I did found out that symfony on Windows (or perhaps PHP on Windows) is still not that easy (though I think PHP on windows has improved with PHP5.3, however none of the people in the workshop were running 5.3 yet). Another problem I had was my throat. I had a sore throat when I started the workshop, and after all the talking my throat felt about to fall apart.

    After the workshop was over and having chatted a bit more with a few of the attendees, it was time for me to quickly make a run back to the hotel to drop off my stuff. Quickly, because I did want to get back to the conference location where from 8PM onwards a big party was scheduled to take place. The organizer, Interlutions, was celebrating their 10th anniversary and all conference attendees were also invited. I must say I was slightly disappointed by the amount of attendees that actually made it back, but the party was good nevertheless. Had some really good discussions about symfony, community, frameworks, PHP, photography and whatever more. Somewhere just before midnight I said my goodbyes, went to the hotel for another good night of sleep.

    As I am writing this I’m on the ICE train back to Utrecht. I still have a bit of a buzz of how awesome the conference was, and I really must congratulate Interlutions and specifically the team that organized symfony Day on how awesome it all was.

  • Holiday is over

    August 30, 2009
    bbq, meeting, php, phpbenelux

    Meeting Houthalen
    The first meeting was wednesday night in Houthalen, Belgium. This was a regular user group meeting such as we organize once a month. It took place in Houthalen in the office of Inventis. And what a night it was! A lot of people were there (over 50 attendees) and after everyone had a drink and some great snacks (awesome work by Weble) we sat down for the first presentation by Chris Ramakers. Chris had a presentation on website performance. Chris immediately admitted not to be an expert on performance, but he wanted to share his experiences with performance as learned from some big projects they recently did. This was a great way of bringing across the message, since most of the information truely came from experience and the solutions were very practical. This made it easy to understand what was going on. The great information combined with a very nice style of speaking and good slides made this talk an excellent introduction into the world of high-performance websites. It’s funny to see that even though you optimize your PHP to the max, your frontend also needs the optimization.

    The second presentation was done by Andries Seutens (of Zend Framework fame). He did a presentation on every day design pattern, those patterns that PHP developers use on a daily basis (sometimes without even noticing they do). Andries was clearly very nervous, but his message still came across quite well and he showed that he should not really be nervous because he had a strong presentation. I know for sure that many people picked up some useful information from this presentation.

    As always there were also some goodies to give away. We were lucky enough to be allowed to give away a ticket for the PHPNW conference in Manchester. Also, Weble was kind enough to give away two tickets for the Weble Tutorialdays. Overall, this meeting was the best (and also the busiest) meeting we’ve ever organized.

    PHP BBQ 2009
    Friday it was “our” (the dutchies) turn for a meeting. Our meeting was in the form of a BBQ combined with presentations. The BBQ was kindly hosted by Dutch Open Projects who opened up their office to all attendees. The schedule was busy and we were trying something new with our community speakers.

    After the opening the day started with our main speaker, Harrie Verveer from Ibuildings, who gave his talk on FLEXible PHP. It was a nicely balanced talk between Flex and PHP (mostly Zend_Amf) which gave some good information on how to integrate these two technologies. Harrie had a pleasant presentation style. Definitely an interesting talk.

    After a short break it was time for our little experiment. 4 speakers each had 20 minutes to do a short presentation about a topic they’re passionate about. First up with Marc Veuger with a presentation of his ABC Manager 5 CMS, a CMS based on Zend Framework and Flex. I would’ve loved to see a more technical approach, but it was a nice showcase on what is possible with Flex and PHP. Second speaker was Ghica van Emde Boas on Databinding, Datagrids and PHP. She used the Backbase javascript framework to show that you can do quite fancy data grids with HTML, javascript and PHP. An interesting and refreshing approach. The third presentation was done by the woman that did the best talk of the Dutch PHP Conference: Juliette Reinders Folmer. She gave a slide-less talk about regular expressions that brought across some nice things you can do with regular expressions. Excellent talk again! Last talk was for Jurrien Stutterheim who gave some information on advanced use of the Zend_Paginator component, of which he is the author. It’s nice to see that Jurrien went beyond the standard use cases of a paginator, quite interesting to see what you can do with it.

    After the presentations we were also giving away a ticket to PHPNW. Then it was time for the BBQ. Drinks were sponsored by Angry Bytes, which made the drinking all the more fun ;). We ended the night with some heavy thunderstorms but those definitely couldn’t spoil the night anymore. What a great event!

    I am already looking forward to our next regular meeting, which will most likely take place on tuesday 29th of september in Tilburg. Interested in that meeting? Keep an eye on our website, where the meeting will be announced.

  • Sound on HP Pavilion dv7

    August 22, 2009
    community, dv7, google, hp, kubuntu, linux, open source, pavilion, sound

    This is another example why the community around open source projects is awesome. It is the perfect example of why you should share your solutions with the world at large. Whether you do it on your own weblog, on a forum, in a mailinglist. The solution to a lot of common problems is a single google away.

    This new laptop I have, it is awesome. I mentioned that before. But sound was not working. And music is one of the most important things I need when I’m working. So I just sat down and started googling. Since I run Kubuntu on my Pavilion, my search query was simple:

    kubuntu sound pavilion

    I click the first link in the results and the original poster of the thread describes a problem that sounds (pun intended) just like mine. The first person that responds describes a very simple solution. The solution makes sense: adding a line in the configuration of the Alsa module that leads a specific option for the Intel HDA chipset, the chipset that powers the dv7. I add the line, reboot. It works!

    Don’t you love open source communities?

  • Two new meetings in one week!

    August 12, 2009
    belgium, events, netherlands, php, phpbenelux

    The first meeting is on august 26th in Houthalen in Belgium. It’s the regular phpBenelux meeting for Belgium, which will take place at the offices of Inventis. There’s two speaker slots, one of which is confirmed already and will be filled by Andries Seutens. He will be talking about Design Patterns. Of course, there will also be room for networking and chatting, and some goodies will be given away! Plus, Weble promises to take care of food, so you’ll be fed with input for both mind and body! So come and join us in Belgium, it promises to be an awesome evening.

    And because we like the combination of mind and body that much, the dutch phpBenelux crew is organizing PHP BBQ 2009 on friday august 28th. During this event, which starts at 14.00, we will have Harrie Verveer speaking on PHP, Flash and Flex. There are also 3 20-minute spots for speakers from the community for which there is currently a small CfP open. So if you want to speak and have a good idea, please do submit your talk! After the talks, the BBQ will be heated up already and the eating and drinking can start. The PHP BBQ 2009 is held at the offices of Dutch Open Projects in Leusden, who generously donated their location for this BBQ. Registration for this event is 15 euro to cover food and drink costs, unless we find some other generous sponsors to donate some money. Interested? Contact me for sponsoring options! Interesting in attending? Register here!

  • Two new jobs in one week!

    August 6, 2009
    community, php, symfony

    The position of Community Manager is a relatively new position inside the symfony project. It was launched last year at the SymfonyCamp at a discussion on how the community can be more active and how these contributions could be managed better. I posed the idea of a community manager, and Fabien liked the idea. Kris Wallsmith stepped forward and took the lead in filling the position. In the past (nearly a) year, he has done a very nice job, launched a few ideas and kept in touch with people.

    Kris is taking on the position of Release Manager for both symfony 1.3 and symfony 1.4 though, and as such was looking to pass his Community Manager position on to someone else. I am quite honored that I was approached for the position, and I think I’ll have a blast doing this. As most people are aware of by now, I am quite a fan of symfony, and also someone who likes to be involved in communities. So now, I can combine those two things in this new position!

    As to what you can come to expect, this is all still a bit vague. I’ve had some ideas for a while already which time constraints did not allow me to work out in detail. But one thing is certain already: If you have a symfony event or community effort that you want to launch, please do get in touch with me and I’ll see if I can be of assistance in any way!

  • New job!

    July 21, 2009
    personal, php, symfony, unet

    The decision to work for Unet did not come easy as there are quite a few cool opportunities on the market here in the Netherlands right now (looking for one? let me know, I can point you in a few directions!). There were a few main reasons I decided to go for Unet in the end:

    1) No PHP development shop
    Unet is not a PHP development shop. The PHP work done at Unet is not done for external clients but for internal clients. Even though working for external clients can be fun, I’ve already experienced the joy of working for internal clients on shared products while working at TomTom, and have found that to be very cool. It allows you to focus on quality and ensures shorter lines of communication between “client” and developers.

    2) Muchos symfony
    The main project I will be working on is an internal PHP-based application which is built on symfony (1.2 at this point). Given my involvement in the symfony community and advocacy for the framework, the fact that most of the PHP work done at Unet is based on symfony is a huge plus for the company (at least to me 😉 ).

    All in all enough to be excited about I’d think!

  • Speaking at symfony Day 2009

    July 20, 2009
    conference, php, symfony, workshop

    This new single-day conference taking place in Cologne is an excellent way for both beginners and more advanced users of symfony to learn new things, expand their network in the symfony community, and simply have fun.

    Workshop
    For beginners, I will be hosting a full-day workshop. The workshop will be a combination of theoretical information on the structure of symfony and symfony projects and how certain things work and actual work. During the course of the day, all attendees will work on developing their own symfony application (so bring your laptop!).

    Expert track
    For those already proficient with symfony looking for more advanced topics, there is a presentation track. Topics such as case studies, doctrine 1.2 and symfony 1.3, testing with lime, best practices and Sympal CMF will be presented by Jonathan Wage, Bernhard Schussek, Nicolas Perriault, Xavier Lacot and Rob Bors.

    Party!
    After satisfying your thirst for information you will be able to satisfy your thirst for fun and drinks at the party. Organizer Interlutions is celebrating their 10th birthday and all participants of symfony Day Cologne are invited to join them in their celebrations. Come join speakers and attendees and have fun at the party!

    Wow, that must be expensive
    Not really! Participation is only 80 euro, a very affordable price for a conference like this! Registration is already open , so register now! I hope to see you there!

  • PHP Hidden Gem: similar_text()

    July 10, 2009
    hidden gems, php, strings

    Today, I was having such a situation. I am working on a hobby project where I aggregate feeds from several different sources. With the blogs I work it right now, it often happens that an author posts the same post to a few different sites. However, because of site formats and sometimes also quick edits an author makes on one site but not on the author, the article contents are usually not identical strings. So I needed something that would help me figure out whether or not two strings are nearly identical.

    First I was Googling around a bit, trying to figure out what was a sane approach for this. I was thinking of simply piping it into diff and parsing the response, but that seemed highly inefficient. I also came by xdiff, a PECL extension which allows for some very cool functionality, but in the end I didn’t really want to diff, I just wanted to figure out if strings were similar.

    The fact that Google brought me to PHP.net though made me consider PHP might actually have a solution to my problem already. Then I remembered using soundex() before, which is sort of what I need, however I need it for more than just a single word. I decided to check the soundex() page anyway, to see if there were similar functions listed that would perhaps help me out. And indeed there were: levensthein and similar_text both seemed to do something approaching what I needed.

    I first checked levensthein, however it allows checking strings of maximum 255 characters, too short when comparing full blog post bodies. So I went with similar_text, and indeed, that worked fine. My current isDuplicate() method is now:


    static public function isDuplicate($item1, $item2)
    {
      similar_text($item1->get(‘text’ ), $item2->get(‘text’ ), $perc);
      if ($perc > 75)
      {
        return true;
      }
    }


    I am still trying to figure out which percentage will catch the duplicates but not catch too many posts which are only similar but not actually duplicates, but with the above 75% I seem to catch quite a few duplicates so far.

    So, next time you are in a similar situation, remember, there is an awesome function out there called similar_text(). And perhaps more importantly: Next time you need to implement some very specific functionality that you usually don’t need, first try PHP.net (and Google) before writing your own solution.

Previous Page
1 … 22 23 24 25 26 … 61
Next Page

skoop.dev

  • Bandcamp
  • Mastodon
  • Bandcamp