php – Internet Strategy Guide https://phpprotip.com Together we can defeat the internet Tue, 07 Mar 2017 02:01:20 +0000 en-US hourly 1 https://wordpress.org/?v=4.7.29 55205001 Copyright © Internet Strategy Guide 2013 chance@chancegarcia.com (Internet Strategy Guide) chance@chancegarcia.com (Internet Strategy Guide) http://phpprotip.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg Internet Strategy Guide https://phpprotip.com 144 144 Together we can defeat the internet Internet Strategy Guide Internet Strategy Guide chance@chancegarcia.com no no fun with arrays and requirement chains https://phpprotip.com/2010/12/fun-with-arrays-and-requirement-chains/ https://phpprotip.com/2010/12/fun-with-arrays-and-requirement-chains/#comments Wed, 01 Dec 2010 21:21:09 +0000 http://phpprotip.com/?p=484 Recently, I had to figure out if a given set of features contained all of their necessary requirements.

For better or worse, the table was modeled so that the feature table referenced itself so that it could create a parent/child requirement chain. For example:

feature_id requirement_id
2 null
5 2
7 null
11 5

So my problem is to find out if a given set of requested features, make sure that the requirements are also present. This includes any requirements the requirement feature may have. In this example, 11 requires 5 which requires 2.
Let’s take $featureRequest1=array(2,5,7,11) and $featureRequest2=array(7,5,11). If I were to run a look up of requirements, I would find that we have

$requirements=array(2,5).

I tried to use the php in_array function but it didn’t work as I expected it to.

in_array($requirements,$featureRequest1); // i expect true
var_dump(in_array($requirements,$featureRequest1)); // false
in_array($requirements,$featureRequest2); // i expect false
var_dump(in_array($requirements,$featureRequest2)); // false

I then realized what I need is for there to be a clear intersection between the requirements and the request.

$requirements==array_intersect($requirements,$featureRequest1); // expect true
var_dump($requirements==array_intersect($requirements,$featureRequest1)); // true
$requirements==array_intersect($requirements,$featureRequest2); // expect false
var_dump($requirements==array_intersect($requirements,$featureRequest2)); // false

I should probably note that array_interest will preserve the array keys. To fix it, you can either flip the 2 arguments or pass the return array to array_values

]]>
https://phpprotip.com/2010/12/fun-with-arrays-and-requirement-chains/feed/ 2 484
Meet the PHP Dev Derby Team https://phpprotip.com/2010/09/meet-the-php-dev-derby-team/ https://phpprotip.com/2010/09/meet-the-php-dev-derby-team/#respond Fri, 10 Sep 2010 14:45:57 +0000 http://phpprotip.com/?p=469 I liked how the Dev Derby website did team leader profiles and decided to try to do something similar. No one provided any pictures but most did answer some questions I asked so without much further ado, meet the PHP Dev Derby Team.

The team consists of

  • Dennis Rogers (@_drogers)
  • Max Beatty (@maxbeatty)
  • Matthew Haralovich (aka zon)
  • Grant Simpson (@grantls)
  • Ryan Dagey (@dageytech)

Update: added in Ryan Dagey’s answers. And photo.

Meet Dennis Rogers (@_drogers)

What do you like about PHP?

It’s what I know, and free.

What book,movie or album do you think best embodies your personality?

Anchorman

What is your biggest pet peeve?

The expression “pet peeve”

What inspires you?

Power Ballads.

2 or 3 favorite quotes, sayings, etc. (e.g. “If you want to achieve greatness, stop asking for permission”)

“that’s a bold statement”

Meet Max Beatty (@maxbeatty)

What do you like about PHP?

I like PHP because it gets the job done. You can do what you need to do with it.

What book,movie or album do you think best embodies your personality?

I’ve recently drawn some eerily similarities between myself and Tony Hsieh in his book Delivering Happiness, but Mark Hoppus wouldn’t be a bad comparison – easy going, fun loving, knows his stuff at the end of the day.

What is your biggest pet peeve?

Making things harder and more complex than they need to be.

What inspires you?

Simplicity. Anything that has everything it needs and nothing more.

2 or 3 favorite quotes, sayings, etc. (e.g. “If you want to achieve greatness, stop asking for permission”)

“There is no such thing as information overload, just bad design. If something is cluttered and confusing, fix your design”. – Edward Tufte

“You can here because we do this better than you, and part of that is letting our creatives be unproductive until they are.” – Don Draper

Meet Ryan Dagey

What do you like about PHP?

Coming from a C[++] background, I found PHP easy to pick up.  Outside of VBScript, PHP was my first formal scripting language, so I appreciated how quickly I could develop a script to do what I needed, compared to compile&  debugging.
Another favorite PHP feature of mine is easy integration into web frameworks, even when using object-oriented.  Compared with C#,PHP makes accomplishing the simplest and complex tasks as natural as writing pseudo-code.

What book,movie or album do you think best embodies your personality?

“The Usual Suspects”

What is your biggest pet peeve?

People’s pet peeves, I take people as they are, very much a laid back go with the flow, laissez-faire attitude guy

What inspires you?

I’m inspired by those who achieve the impossible, learning about great feats of science and the unyielding quest for answers.

2 or 3 favorite quotes, sayings, etc. (e.g. “If you want to achieve greatness, stop asking for permission”)

Do or do not, there is no try -Yoda
Courage is not the absence of fear, but the mastery of fear -Samuel Clemens

Enhanced by Zemanta
]]>
https://phpprotip.com/2010/09/meet-the-php-dev-derby-team/feed/ 0 469
Call to Arms https://phpprotip.com/2010/08/call-to-arms/ https://phpprotip.com/2010/08/call-to-arms/#comments Fri, 20 Aug 2010 18:15:08 +0000 http://phpprotip.com/?p=458
A selection of programming language textbooks ...
Image via Wikipedia

How much code can you generate in a day?

We are actively recruiting participants to take place in a developer event (“Dev Derby“) that pits one language against others. It is a day-long programming challenge where teams of developers work to create an application serving a real-world need. Five teams will represent different programming languages—PHP, C#, Ruby, ColdFusion, and Java—to produce a demo application that will be released as open source software.

http://devderby.com/application/

Team Leaders for each language will review applications and select competitively balanced squads. There is no cost to enter, but spots on teams are limited. Winning teams can win prizes and all participants are eligible for discounts to other tech events taking place that week.

The Dev Derby will start and end on Saturday, September 11, 2010, in Bloomington, Indiana. It is part of The Combine (http://thecombine.org), the area’s first major technology conference, and at the start of the BFusion/BFlex conference (http://bflex.info). Dev Derby involves an intense six-hour coding session.

Each challenge submission will be judged by knowledge leaders and representatives of the non-profit organizations benefiting from this work. The criteria spans Design (features and UI choices made), Technical Efficiency (code and performance), Communication (documentation and presentation), and Practical Value (use, adoption, and maintenance).

Prizes will be awarded at the end of the day, following a panel discussion about the development process and the future of application programming.

Dev Derby is situated in The Combine along with other technology-related events, such as Tech Cocktail, Ignite Bloomington, and a variety of of other gatherings. It is hosted by the BFusion/BFlex conference, a two-day hands-on training event from the experts of Adobe Flex and ColdFusion. Dev Derby is inspired by our experience with Startup Weekend in 2008, but with a short day of coding and focused on a specific challenge.

Apply now: http://devderby.com/application/

Enhanced by Zemanta
]]>
https://phpprotip.com/2010/08/call-to-arms/feed/ 1 458
Valuable Professional Reading https://phpprotip.com/2010/08/valuable-professional-reading/ https://phpprotip.com/2010/08/valuable-professional-reading/#comments Wed, 11 Aug 2010 19:12:38 +0000 http://phpprotip.com/?p=451
book cover
Image via Wikipedia

The team leaders for Dev Derby have been asked to list what we consider valuable professional reading. Our book selections are not limited to our respective Languages. I thought I would share my list with everyone.

The first 2 (GoF design patterns and Patterns of enterprise application architecture) really just need to be in every developer’s library. The rest are a collections of books I’ve read and liked as well as recommendations from developers I like and respect. Keith Casey pointed me in the general direction of a lot of these books.I suspect that some of the Dev Derby people will end up contacting various publishers to solicit swag sometime soon.

In other news about Dev Derby, I think that an application for teams should be available to announce sometime soon geneerinen cialis. I do know we have a deadline for selection approaching and it’s kinda hard to select without people to select from.

GoF design patterns:
* ISBN-10: 0201633612
* ISBN-13: 978-020163361

Patterns of enterprise application architecture:
* ISBN-10: 0321127420
* ISBN-13: 978-0321127426

Code Reading:
* ISBN-10: 0201799405
* ISBN-13: 978-0201799408

Guide to PHP Design Patterns:
* ISBN-10: 0973589825
* ISBN-13: 978-0973589825

Building Scalable Web Sites:
* ISBN-10: 0596102356
* ISBN-13: 978-0596102357

Peopleware:
* ISBN-10: 0932633439
* ISBN-13: 978-0932633439

Mythical Man Month:
* ISBN-10: 0201835959
* ISBN-13: 978-0201835953

The Pragmatic Programmer:
* ISBN-10: 020161622X
* ISBN-13: 978-0201616224

Code Complete:
* ISBN-10: 0735619670
* ISBN-13: 978-0735619678

Zend PHP 5 Certification Study Guide:
* ISBN-10: 0973862149
* ISBN-13: 978-0973862140

Guide to PHP Security:
* ISBN-10: 0973862106
* ISBN-13: 978-0973862102

Guide to Enterprise PHP Development:
* ISBN-10: 0973862181
* ISBN-13: 978-0973862188

Guide to Programming with Zend Framework
* ISBN-10: 0973862157
* ISBN-13: 978-0973862157

Enhanced by Zemanta
]]>
https://phpprotip.com/2010/08/valuable-professional-reading/feed/ 1 451
Auth/ACL implementation strategies https://phpprotip.com/2010/08/authacl-implementation-strategies/ https://phpprotip.com/2010/08/authacl-implementation-strategies/#comments Mon, 09 Aug 2010 18:52:21 +0000 http://phpprotip.com/?p=384 I’m going to talk more about ACLs than Auth. Auth is simple, it’s the ACL that will trip you up.  Since both concepts are coupled together when you’re making a login system, I feel it’s appropriate to at least touch on Auth. What I want to cover is the ways we can create the ACL object to suit needs based on the scale of the project. I’m going to assume that readers have a passing familiarity with using the Auth and Acl objects and may have even implemented them into projects.

Zend_Auth

The reason I say Auth is simple is because Zend Framework makes it simple with their Zend_Auth class. You can pick an auth style, implement and then go from there. For the purpose of this discussion, I’ll be talking using Database authentication. So after one has set up a login page that uses Zend_Auth (there are already a lot of articles that cover this so i’ll move on), the major bear you have to tackle is using the Zend_Auth_Result to determine proper access. Sounds simple, that’s what Zend_Acl is for.

Zend_Acl

So how do we create our Acl? Again, ZF’s reference guide gives us some handy-dandy examples of using their object but how you utilize the object depends on your scale. Other articles give you a way to bind the two together, usually via a controller plugin of some sort. The thing that can be tricky is how you want the Acl and Auth to interact with each other within that plugin. I utilize a controller plugin that fires off an Auth/Acl check in the dispatchLoopStartup() method. If no Zend_Auth_Result object exists, it assigns a guest role and if one does exist, it searches the Zend_Auth_Storage for a role value (assigning guest if one doesn’t exist somehow) and checks that value against the Acl that was created in my Bootstrap. My biggest conundrum has always been translating Requests into Resources. I’ll talk more on that later viagra from india.

Scaling

I tend to put my scaling into one of the following categories: small,decent or ZOMG. Small is something like a personal site or a proof-of-concept/self-tutorial project where my users will probably be a 1-5 roles and 1-5 resources at best. Decent is most collaborative niche projects with 50-100 resources. ZOMG is where the number of resources I’m dealing with is >100, unknown or potentially large. I define my ACLs in my Bootstrap in one of three ways:

  1. Hardcoded
  2. As part of my Navigation Object properties
  3. Pulled from a database

Hardcoded

This one is easy to implement since if you follow the ZF reference or the numerous guides/posts you find when you google for auth/acl systems, you’ll be able to hardcode your ACL. I find this ideal for small projects where the number of resources is relatively low and the growth of adding additional resources is non-existent. This is the simplest way to do things.

Navigation-based

This method makes use of the Zend_Navigation object. Brandon Savage wrote up a nice guide to integrating ACLs into you r Navigation. I usually instantiate my Navigation objects in the Bootstrap from a XML file. The only tricky thing I found with this is finding the appropriate Navigation_Page (that tells us our resource/permissions) from the Request object. I tend to utilize this method when the growth of resources occurs at a slow pace.

Database-driven

This particular method is what spurred me to write about Auth and Acl. I see this solution as ideal for a high amount of resources or where the growth of resources to have fast spurts.  This solution can allow for ease of maintenance and is scalable. Even though it is a scalable solution, I kind of see it as overkill for smaller, low-growth projects.

Multiple project ACLs

Since I’ve began working with Zend Framework, I have used it to create both internal apps in addition to running my company’s main site. To date, I have a total of eleven internal applications, some of which require Auth/Acl and some of which do not. Those that do not require them will soon be requiring them due to future features we wish to implement for them. At first I was working on a drag and drop solution for setting up an Auth/ACL system for any given project. I was going to work it a stand-alone module where all the developer has to do is call the Module Bootstrap within the Application Bootstrap. The drag and drop solution was going to rely on the project’s Navigation object for determining the ACL of a requested page. Then it occurred to me that even if I could make this ‘simple’ drag and drop solution, we’d be faced with reapplying it to ten more projects and have subsequent setup processes for each additional project. This seemed highly inefficient and a pain in my ass.

Control Panel

My next realization was that there was multiple overlap on the users accessing various internal applications and way too many vhosts to make for each project. It seemed like it would be better to do the ultimate refactor and create a centralized control panel for people to authenticate and access internal applications.

I was still hung up on wanting to reuse my Navigation based code when I figured out that maintaining the navigation XML would be another nightmare. I had attempted a database solution for one project and it became a pain to maintain the ACL when I introduced Routing to the project. It was a bitter and hateful experience to get it working and since both the Auth/ACL and Routing parts of the project were done before I had embraced unit testing, sorting through my crazy monkey patching logic would only intensify my rage. I also recalled that the biggest issue with that proto-solution was translating the Request into a Resource.

In the schema shown on the right, the Resource.Name corresponded to the Request’s Controller and Privilege.Name corresponded to Request’s Action. When the ACL was created in the Bootstrap, it would create Module.Name_Resource.Name as the resource then associate privileges to that resource. Routing and Controller forwarding made this whole thing hard to mentally track. I ended up having a lot of monkey patch entries to make it work in the end.

So here I was, just generally damned when I thought up a way around the issues I had with the previous schema. I would need to have the Resource.Name independent of the Request URI in order to avoid routing issues. By associating the Resource to a URI, I don’t have to account for if Routing exists or not. The URI will always be available and the core ACL system will be independent of any Routes that do/don’t/might exist. Privileges bound to action seemed like a lot of overkill since all privileges come down to CRUD (though I always like the BREAD acronym better). In addition, privileges would be off in their own world and reused when necessary (the last schema had too many redundant privileges associated to different resources).

As I stated earlier, the goal is a unified login for internal apps (there are currently eleven and this number will grow). The user table consists of a username, password and control panel role. This role allows for future interfaces to be built that can manage the control panel such as adding a project or adding users. If you’re wondering why I have the password column as able to be null, it’s to support some legacy items. Next major table is the project table which lets me have a project_user table  that is also has a role associated with it. I made role a separate table since a lot of the projects overlap on roles such as guest and admin. Resources can be specifically named or generalized as necessary. All my links (URIs) can share a resource name if necessary. Finally there is the privilege table along with a resource_privilege table that allows me to maintain those relationships. While I have a separate control_panel_role, I decided that the control panel resource/privilege system doesn’t need to be separate. I only wanted to make sure that the control panel system was accessible even if there was no projects available for selection. I’m planning on making the past projects into modules under this system and all future internal apps accessible/controlled from here. I lack any co-workers that I’m able to debate the merits of this idea with and given that this will be a major refactor of my work thus far, I am asking for feedback on the idea. Am I missing any other viable ways of defining the ACL that would be easier/better? I’m not a DBA so I’m wondering if my tables are actually optimized well enough. Any other issues or thoughts I haven’t considered?

Enhanced by Zemanta
]]>
https://phpprotip.com/2010/08/authacl-implementation-strategies/feed/ 3 384
Dev Derby https://phpprotip.com/2010/07/dev-derby/ https://phpprotip.com/2010/07/dev-derby/#comments Fri, 30 Jul 2010 20:37:22 +0000 http://phpprotip.com/?p=374 This morning I accepted a postion as supreme overlord team leader for the PHP team in The Combine‘s Dev Derby.

What is Dev Derby?

The Combine (http://thecombine.org) is a tech event in Bloomington, IN going on from Sept. 9th-12th. On Sept. 11 there will be a “Dev Derby”. This is a one-day programming event which challenges teams, representing different programming languages, to build a web-based application for use by non-profits. The code will be released as open source, giving it life after the day has ended. There will be 5 teams competing. My suspicions say that there will be a Rails team and a CF team in addition to the PHP team.

I’m not sure how finalized some of the information I have on the details are but here is what I do know:

  • Each team will be limited to 7 people (including myself). Depending on demand by Combine attendees, they may allow up to 3 additional “walk-ons”.
  • The nature of the challenge won’t be revealed until Sept. 8.
  • As team leader, I will be participating in the planning of this event, helping shape the challenge scope, defining the technical environment and determining the judging criteria.
  • From the sound of things, we will have some sort of requirements spec to work off of and plan the project from.
  • A designated team member or myself will be in a panel discussion sharing the team process and debating code with other team representatives.
  • The Combine will have a recruiting campaign with a link to an application to collect names of interested developers. (If you’re impatient and want to be part of the glorious PHP team, hit me up)
  • We will be provided with a food an d beverages that day. NOMS!
  • There will be prizes. Some just for participating.

Team PHP

Until I start having to sift through applications for team members, I’m wondering who I’d need to hit up for some elePHPant T-Shirts for Team PHP to have. Also, we need a better pseudonym than “Team PHP” or at least some sort of awesome slogan to bring fear and envy into the hearts of our opponents. Join me and together we shall rule the galaxy in the fun and help crush our enemies, see them driven before us and hear the lamentation of their women show the awesomeness that is PHP.

Enhanced by Zemanta
]]>
https://phpprotip.com/2010/07/dev-derby/feed/ 2 374
tekx – my thoughts https://phpprotip.com/2010/06/tekx-my-thoughts/ https://phpprotip.com/2010/06/tekx-my-thoughts/#comments Tue, 01 Jun 2010 14:56:30 +0000 http://phpprotip.com/?p=359 It’s been about a week or so since tekx ended and I figured that (since I didn’t do one last year) I should put my own personal thoughts down. This was my second year at tekx and I was looking forward to the conference and it did not disappoint my expectations. Oh yeah, I’m going to write like my live blogs were and do mostly stream of thought with as little editting as possible. Want the TLDR version? It was fucking awesome, you should berate yourself for not finding a way to go and resolve to be there next year.

So last year at tek, I twittered my thoughts/notes on the sessions. I twittered so much, that only @spooons and I seemed to be in competition for most tweets tweeted at tek (that last snippet could almost be a tongue twister). I had meant to compile those thoughts into more formal posts/notes. That didn’t work out as planned. This year, I saw a post in the attendees google group about the use of recording devices in sessions which lead me to purchase a Flip MinoHD with the full intent of having something to barter for other people’s recorded sessions. It wasn’t until the tutorials and first session that I realized I just had a flimsy excuse to by myself a HD recording device. The tutorials were too long to record and the first session made me realize I’d never get good positioning for the camera to have a decent recording. This is when I thought up what turned out to be the best idea ever…I wrote my notes on my blog and posted them decided to do live blogs about the experience. Go ahead and look at the other posts if you want my specific thoughts on each tutorial and session. This post is some additional after-thoughts and what-not.

Day 1: the arrival

I got in later than I thought I would for check-in due to a combination of weather and traffic. It was amazing how familiar and less nerve-wracking the drive up is when you know some people who’ll be there early and are less intimidated by the prospect of getting lost. After decompressing from the trip (and missing dinner with @frozensolidone and some others going to Giordano’s, I ended up joining @elazar, @derickr, @sweatje, and a bunch of other people at Shoeless Joe’s (aka Pantless Pete’s, Thongless Tina’s, Braless Betty’s…). We ate, drank and had all manner of tek fun. Some of us even made plans for Lost the next night.

Day 2: I’s gunna lern me sumting

Among other things I learned at the tutorials, was how to spell properly. >.>

Also learned that your brain can explode from too much awesome but that, in itself is awesome. The tutorials I attended were Bad Guy For A Day and Best Practices.

Black first-generation iPod Nano.
Image via Wikipedia

Arne‘s talk was about security and showed us how to view our sites in the way a hacker would. He also went over social engineering practices and a whole bunch of things I’ve talked about already. The best part was when he just got done talking about how easy it is to steal information with a USB stick by letting people’s natural curiousity cause them to plug the USB stick in their computer and letting whatever nasty thing you have there do its job from there. He of course proceeds to hand the stick he held up to demonstrate his point and saying that the source we’ll be going over will for the rest of the tutorial. One thing I didn’t put in my live blog that was going through my head was that the USB attack isn’t limited to just flash storage drives. I remember back in 2005-2006 that one could perform the attack with an iPod. Since the iPods back then were able to double as mass storage device, it wasn’t tough to find a kind soul that would let you “charge your iPod” (maybe i shouldn’t quote that. makes it seem like a euphemism for sex and not a hacker attack) on their computer. I had tried it out by loading the necessary things onto a iPod Nano I had and testing it on my personal machines. I never did get to try to use a friend as a proper guinea pig. Anyways, the point of that rambling was that Arne might want to use something other than the USB stick that has the tutorial source as a visual reference. =D

As awesome as Arne‘s tutorial was, it was the Best Practices tutorial is one of the things that made the trip worth every single penny and more. First point of awesome is the amount of varying topics they managed to cover was mind blowing. The fact that Matthew Weier O’Phinney (@weierophinney) and Lorna Jane Mitchell (@lornajane) were presenting was another point of awesome. I couldn’t begin to espouse the level of respect I had for these two before this tutorial and the tutorial itself has pretty much ascended them to godhood in my eyes. I had feared this tutorial would be a bad choice since I’m familiar with and practice a lot of the best practices they covered. They kept my interest on topics I should’ve been going “been there, done that” and when it came to things I wasn’t familiar with, they gave a lot of food for thought.

Since this was a Lost night (and the night before classes), @frozensolid, @xiian and I ended up watching Lost and geeking out instead of going out.

Day 3: it has begun

For a lot of people Day 3 is Day 1. I feel bad for those people, they miss out on a lot. Let us take a moment to mourn the awesomeness they lost.

The opening keynote was given by Josh Holmes. The sheer amount of disdain, hatred and anger Microsoft has caused me to have over the past decade made me leery of the keynote. On the one hand, they were (according to all I heard) a major sponsor this year and on the other, they are responsible some of the most bloated pieces of shit in the computing world. So when I read the title, I simultaneously WTF’d and giggled.

Image representing Microsoft as depicted in Cr...
Image via CrunchBase

This may become a rant so the TLDR version is: Josh Holmes managed to win me over. I’m not on the Dark Side but I do see Windows as more than a bloated game console. I think Cal Evan’s post on Microsoft summarizes things best.

With that said, I will carry on with the my thoughts on the keynote. To be brutally honest, Josh Holmes rubbed me the wrong way at first. Here’s this guy demanding that we be enthusiastic in our answers to his questions. I haven’t finished my Red Bull yet, I’ll be energetic when I damn well feel like it thank you very much. I think if I wasn’t intent on making unbiased notes that could be used by others, I would’ve tuned out the rest of what he had to say and that would’ve been a major loss on my part. For all the jokes that I want to make about the contrast of a guy from the company who made Word trying to tell us to keep things simple, he touched upon a lot of what is wrong/tough about enterprise development. Hell, what can sometimes be wrong about development in general. Sometimes in our narcissistic need for a beautifully engineered solution, we over-engineer things. I’ve seen this happen more often in large companies but sometimes you see it in smaller shops. You have someone who needs a hammer but instead you make them a Gnomish Army Knife. We shouldn’t add complexity to a simple solution. We need to understand have to understand what our frameworks are doing in order to understand if they truly are the solution to the problem at hand or if we need to use a different tool. We need to concentrate on prioritizing features by ROI, look at usability and test, test, test. These were all sentiments I can stand behind. I’m perfectly happy to continue using OSX at home and Ubuntu at work but Josh’s keynote has opened my mind to considering windows deployments. The man did his job well. I say if he can crack the armor of a curmudgeon like me, they should probably give him a raise (totally not sucking up since he’s now following me on twitter. >.> <.< ^^). Seriously though, if part of his job is to turn over or chip away at the “FUCK Microsoft” crowd, then he is doing the job well.

The Zend_Form session given by @akrabat was another thing that paid for my trip. The decorators are something I have been struggling with for quite a while. I later ran into him and was flattered by his compliment on my write-up. He even accused me of saying a lot more than he did (or something to that affect), which I can only say that he gave me a lot to work with and he said a lot more than he probably thought he did.

Derick Rethans is truly the master of time and space. He completely obliterated my mind with his session. I couldn’t even do a decent write-up in there. In fact, I think I’m still recovering. The longest day of tekx got even better as I went to @tswicegood’s git session. I’ve been debating switching the version control we use at work from Bazaar (bzr) to git. I don’t see the switch anytime soon but did see some hotness beyond offline commit.

Eli White’s presentation on Code & Release Management was awesome. Not only because I’ve been trying to streamline my code & release management systems but also because Eli kicks ass as a speaker. I really wish that I could’ve made his earlier talk but it conflicted with the Zend_Form talk. I think I may have to do a separate tekx inspired post on this talk, it might help me with applying what I learned from it. People should bug me if I don’t have something up in a couple weeks (next week is personally busy otherwise I’d say next week. gonna need at least 2 weeks).

The last session of the day for me was @s_bergmann’s talk on continuous integration and inspection. This was a nice complimentary session to have after @eliw’s presentation and after the tutorial from the day before. I’m surprised that my head didn’t explode from so much Best Practices being thrown at me in so little time to process.

I honestly don’t remember what happened that night. Must’ve been really kick ass though. Or my mind is overloaded with so much awesome from the whole tek experience that it doesn’t want to taint it with memories…

Day 4: I want to be a rock star

No, I’m not talking about being that kind of rock star but about Rock Band (which we’ll talk about later). In retrospect, I don’t know what I was thinking. After a few mind-blowing days of tek, I somehow thought it would be a good idea to obliterate what brain cells I had left with a dose of more high level sessions. The day before I at least had some previous experience to bind to what they were talking about. Today, yeah…not so much.

I started out with Derick Rethan’s talk on Xdebug. Even though most of the talk was an overview on Xdebug and how it can be used in your development process, there are 2 things to keep in mind:

  1. The talk is given by the creator of Xdebug
  2. That creator is Derick Rethans. Maybe it’s  just me, but the man is intellectually intimidating. He could recite a Beavis and Butthead script and make me feel like I’m missing something blatantly obvious.

After that I was off to Elazar’s talk on new SPL features in PHP 5.3. The talk was awesome, even though I could only keep up with parts of it. The crayon analogy to sets was so clever I didn’t get it until he explained it to me. Can’t think of a easier visual though.

@auroraeosrose‘s talk on streams, sockets and filters gave me a lot to think about. I’ve only vaguely worked with them before but I feel that her talk has prepared me for when/if I need to do extensive work with them.

I ended the day’s sessions by going to @lig’s talk on scalability and mysql. I somehow missed the part at the beginning where she said the talk would be at an intermediate to advance level of knowledge of using MySQL. This was good and bad for me since I hope that I might be approaching the intermediate level and very much consider myself a n00b. The good news is that I found out about a whole lot of hotness that’s in MySQL 5.5. The bad news that about halfway through the talk my brain effectively called me out on the overloading and decided to shutdown. That half of the session, I was effectively going “bwah? how do I make a note on that. I’m pretty sure she said some words there.”

After a thoroughly exhausting day, I went with a group to Giordano’s to get pizza. OMG awesome pizza. I want to move to Chicago and nom that pizza. The next part of the tek adventure was Rock Band night (told you I’d get to this part). I forget what may have originally been planned for the evening activities, but I do know that @elazar and I did conspire to shape it into Rock Band. Ok, we were going for karaoke but then it turned into Rock Band. Microsoft was gracious enough to help the endeavor by providing some of the necessities (360 and the Rock Band 2 band set). I was in one of the 2 bands in the ultimate showdown. We unfortunately lost due to unnamed, *cough* Tom *cough*, reasons. The coolest thing of the evening was that the whole Rock Band package was given out to the top band to split amongst themselves. Grats to @zburnham, @frozensolidone and @engyma (if I recall correctly) on winning. I did manage to show off some drum skills when the set was properly calibrated. I also met a cool dude from Maryland named Mike that plays real life guitar. I gave him my information for him to keep in touch but unfortunately did not get his before leaving tek. Sad Panda. The night’s festivities continued on to more rocking out at @eliw’s room. I managed to use my Flip MinoHD and get some recordings but since then haven’t gotten to upload them. Maybe I’ll find time this week. @rdohms provided some refreshments for the festivities and much awesomeness was had that night.

Day 5: closing time

I tried to go to Ben Ramsey’s talk on memcache and apc but only made it partially through because I was sneezing up a storm and felt miserable. I spent part of that session and the next recouping. Sadly I missed @lornajane’s Open Source Your Career session which I heard was chock full of asskickery. I did however make @auroraeorose’s talk on cross platform php. The talk was highly informative and entertaining. In fact, in addition to Josh Holme’s speech, this was a deciding factor in my conclusion that Microsoft showing that they’re not only playing the game but playing to win. Windows development environments are becoming less of a joke and I’d be dumb not to look into the feasibility or at least keep an eye on things. Marco’s closing remarks were short and sweet where he encouraged us to give back to the community and that user groups are the lifeblood of the community. I swallowed that Kool-aid and ended up starting up a user group the following week. @dragonbe, @caseysoftware and a bunch of others were kind enough to give me some tips on starting one up since I missed the community panel in favor of checking out the cross platform php session.

Some people left right after and got hit by the @eliw curse. I elected to stay because last year leaving after, I got hit by the ground travel version of the curse. Needless to say, staying for the extra night was worthwhile in general. I got to go see Iron Man 2 with @dragonbe and @rdohms. We introduced Mountain Dew to @dragonbe, which he apparently enjoyed. As we got back, we ran into some of the tek stragglers and went to Shoeless Joe’s. The next day @rdohms and I went and got some IHOP food. I was meaning to get there for breakfast all week. If you’ve actually read this far, I commend you. Did I mention that I babble? Maybe I should mention that at the beginning when I do next years writeup.

THE END?

Reblog this post [with Zemanta]
]]>
https://phpprotip.com/2010/06/tekx-my-thoughts/feed/ 3 359
Announcing Bloomington PHP https://phpprotip.com/2010/05/announcing-bloomington-php/ https://phpprotip.com/2010/05/announcing-bloomington-php/#respond Fri, 28 May 2010 15:10:39 +0000 http://phpprotip.com/?p=324
Image of PHP Community from Twitter
Image of PHP Community

I’m going to be ganking some of the announcement structure from Jeremy Kendall’s Memphis PHP Announcement who apparently ganked stuff from @ramsey.

I’m proud to announce that Bloomington, Indiana now has a PHP user group. We also acknowledge the greater Central Indiana area. 😉 The goal of this organization is to take over the world help out php users, dabblers, students , and professionals in the surrounding area while encouraging an active developer community. So far we’ve garnered a decent amount of members in our google group.The amount of activity behind the scenes of the group has been awesome. Matt Hottell, a Lecturer at Indiana  University for the School of Informatics has promised to shamelessly plug notify his students of the PUG (in retrospect, I could’ve probably shortened the group name) and @_drogers has created a Bloomington Web Developers google group to include more developers in our area that work with more than just PHP. I hope to see more growth in the future and appreciate the efforts given so far. This is, after all, a community effort and I can not do this without the support of the community.

Origin Story

PHP has always been a community experience for me. From the start of learning PHP in my Informatics classes to the mentorship I received from the Resite Sproutbox team, I’ve seen just how awesome the PHP Community is. It wasn’t until last year’s php|tek that I wanted to branch that community out into the area I live in. This year’s tekx gave me that final push to put things in motion to achieve that dream. I’d like to thank @caseysoftware and @dragonbe for their help and encouragement that made this a reality.

Details

  • Since the current members of the google group already meet every Thursday evening at The Alley Bar, I figure why break with tradition. We’ll just meet there until the time and need for selecting a quasi-formal arrangement.
  • As of right now, we’re just using the google group.
  • You can follow @bloomingtondevs for community updates and such
    • If you’re wondering about the kanji (養) that is used for the user icon, it translates to: foster; bring up; rear; develop; nurture. Edit: The romanji for it is “you”, which is pronounced “yo” with a long o.
    • If you want to be in the the bloomington php user group twitter list that I’ve made, let me know.
    • We have no hashtag, I’d like feedback. So far I’m thinking #btownphp or #bloomingtondevs

Thank you and welcome to Bloomington PHP.

Reblog this post [with Zemanta]
]]>
https://phpprotip.com/2010/05/announcing-bloomington-php/feed/ 0 324
tekx – cross platform php https://phpprotip.com/2010/05/tekx-cross-platform-php/ https://phpprotip.com/2010/05/tekx-cross-platform-php/#comments Fri, 21 May 2010 17:22:40 +0000 http://phpprotip.com/?p=298 Talk is by Elizabeth Marie Smith (@auroraeosrose).

PHP is officially supported on:

  • Unix
  • Windows
  • Linux
  • Embedded Systems
  • Risc
  • NetWare
  • I5 (or whatever it’s called this week)

PHP is starting to drop support for old systems. Like 5.3 won’t run on Windows 2000. So try to keep up to date. “If you’re running PHP 4, GTFO”

If you write your code right and you get a crazy manager that decides to move, you don’t have to deal with the headaches. For the most part, PHP takes care of the hard stuff. You just need to know the edge cases and know the key differences.

Unix has been for a long time. It was developed in 1969. Different distributions which fall under Proprietary, Open Source and BSD. There is a standard file system setup. Most are case sensitive. They are CLI based. Looking at the shared libraries. ELF and Mach-O. Linux is just a kernel.

Windows is case insensitive, NTFS is case sensitive. Half of the windows programs don’t know how to do this.  It is a GUI based system with drive letter abstraction for the files system. Using FAT really messes up PHP so if you’re using it, GTFO. Look in the superglobal for the environment data, never assume any environment data like installed on C:/.

DLL HELL

SxS is the fix and only 2 people on earth know how to use it (documentation…Sigh). Most important thing to know about DLLs: What is my search path. Your directories are listed in the PATH environment variable. You have to make sure to not set it system-wide. Bad juju. Going to have to link to the slides to the one titled “The Horrible Error”. Until windows has apt-get, you have to know your system.

Installation and Configuration

On Unix/Linux, you use a distribution or compile your own. Distributions will screw things up. They backport security fixes and add extensions that change behavior (like Suhosin). They alter header files. Stripping binaries of symbols, will turn experimental flags on, turn off default extensions (–disable-all), take forever to update versions, and using system libraries instead of bundled versions. Basically, you should build your own and don’t ever rely on the system distribution. Though distributions are great simple installs for newcomers and some offer support.

How do you decide? If it’s a production box, you NEED to compile it yourself. You need to know what you’re putting there. Distribution is good for the dev machine, unless you have a crazy person who will want to deploy it from the development box.

Windows is the only system for which PHP currently provides binaries. Use PHP’s binaries or compile your own if you’re brave. It’s not as scary as it sounds though. The dependencies are the trickiest part.

Environmental Differences

Mostly $_SERVER contents. Use isset() and never assume a variable is there. Also clean the data, don’t assume because it’s from the system that it is safe.

DON’T HARDCODE ANYTHING.

Main server difference between IIS and Apache is in the SAPI not the server.

Be careful with streams and sockets. Another gotcha is process spawning (com can help in some cases with wscript.shell stuff). Be sure about using platform specific stuff (pcntl, etc). If you run into somethign that doesn’t work the same way on multiple platforms, you should file a bug. If you want your bug to go to the front of the class, be sure to write a good test case.

Reblog this post [with Zemanta]
]]>
https://phpprotip.com/2010/05/tekx-cross-platform-php/feed/ 3 298
tekx – lig’s talk on scalability and mysql https://phpprotip.com/2010/05/tekx-ligs-talk-on-scalability-and-mysql/ https://phpprotip.com/2010/05/tekx-ligs-talk-on-scalability-and-mysql/#comments Thu, 20 May 2010 21:56:30 +0000 http://phpprotip.com/?p=285 @lig will be talking about mysql 5.5 and scalability this session She is Senior Technical Support Engineer for MySQL.

We will be covering

  • semi-synchronous replication
  • performance schema
  • SIGNAL/RESIGNAL
  • more partitioning options
  • InnoDB – LOTS of InnoDB (performance and scalability improvements)

In 5.5 InnoDB will be the default!!! WOOT.

Default replication is asynchronous. Meaning master writes to binary log and the slave connects and “pulls” contents of the binary log. Bad thing is if the master crashes, there’s no guarantee that a slave has all committed transanction.

Simi-Synchronous Replication is an alternative to asynchronous replication. Midway point between asynchronous and fully syncronous. Master only waits for a slave to receive an event. Don’t have to wait for slaves to actually commit.

Performance schema tracks at an extremely low level. Just like Information schema, tables are views or temporary tables. Activation doesn’t cause any change in server behavior. This is designed for advanced users.

Think of SIGNAL as an exception, a way to “return” an error. You get exception-handling logic for stored procedures, stored functions, triggers,events and db apps.

RESIGNAL lets you pass error information up. Think of it as a catch. Requres an active handler to execute. Lets you program on your PHP side to catch that very specific handling.

Column partitioning is variants on RANGE and LIST partitioning. Allows the use of multiple columns in partitioning keys. All columns are taken into account for placing rows in partitions and for partitioning pruning. Supports the use of non-integer columns (DATE/DATETIME/strings…).

Major differences from just RANGE is you don’t accept expressions, only names in columns. Looking at an example. You’re looking at full tuples, not the individual parts. Both parts of the tuple have to pass.

List column allows for multiple column values. Do not need to convert values to integers to work with. Much easier to read. Example slide is very hot.

Mutex: Mutually Exclusive lock. Apparently horrible for concurrency.

Read Ahead is when InnoDB tries to be smart for you. Prefetch multiple pages in the buffer cache asynchronously. You can now control when InnoDB performs a read-aahead operation by setting innodb_read_ahead_threshold. Default is 56.

Edit/Note: There was a lot more discussed by @lig but it was over my head a bit. I’ll try to look at her slides and see if I can understand them. Trying the slideshare embed below so that others can see. Feel free to explain the rest of the slides to me because, like i said, they’re beyond my current skill level.

Reblog this post [with Zemanta]
]]>
https://phpprotip.com/2010/05/tekx-ligs-talk-on-scalability-and-mysql/feed/ 1 285