<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Web development</title>
	
	<link>http://oldek.se</link>
	<description>"Assumption is the mother of all fuck ups" Steven Seagal</description>
	<lastBuildDate>Sat, 18 Dec 2010 18:40:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/oldek/qtDl" /><feedburner:info uri="oldek/qtdl" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>And then there was an app</title>
		<link>http://feedproxy.google.com/~r/oldek/qtDl/~3/mi-NpQNh9oE/</link>
		<comments>http://oldek.se/2010/12/18/and-then-there-was-an-app/#comments</comments>
		<pubDate>Sat, 18 Dec 2010 18:40:13 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[iTimeTracker]]></category>

		<guid isPermaLink="false">http://oldek.se/?p=1481</guid>
		<description><![CDATA[The iTimeTracker app just reached the Swedish app store, and is possible to download. I could be used to review worktimes, and keep track of your schedule. The app is connected to the web app called TimeTracker (development name) and is only for use with that app. http://itunes.apple.com/se/app/itimetracker/id406854010]]></description>
			<content:encoded><![CDATA[<p>The iTimeTracker app just reached the Swedish app store, and is possible to download. I could be used to review worktimes, and keep track of your schedule. The app is connected to the web app called TimeTracker (development name) and is only for use with that app.</p>
<p>http://itunes.apple.com/se/app/itimetracker/id406854010</p>
<img src="http://feeds.feedburner.com/~r/oldek/qtDl/~4/mi-NpQNh9oE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://oldek.se/2010/12/18/and-then-there-was-an-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://oldek.se/2010/12/18/and-then-there-was-an-app/</feedburner:origLink></item>
		<item>
		<title>Objects</title>
		<link>http://feedproxy.google.com/~r/oldek/qtDl/~3/YLq-CCsT-KU/</link>
		<comments>http://oldek.se/2010/11/12/html-get-requests-2/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 00:33:26 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[objects]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[register]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://oldek.se/?p=1471</guid>
		<description><![CDATA[I love using objects, it is just my way of working. In one of my phtml scripts it could look like: 1echo $this-&#62;register-&#62;node-&#62;user-&#62;name; And it refers to the users name of the person who made an entry in my registry. Now this might not be the typical case, as this is limited to only one [...]]]></description>
			<content:encoded><![CDATA[<p>I love using objects, it is just my way of working.</p>
<p>In one of my phtml scripts it could look like:</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">node</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>And it refers to the users name of the person who made an entry in my registry. Now this might not be the typical case, as this is limited to only one node per register. You would instead set up node to be an array and loop through it with a foreach for example.</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">node</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$node</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$node</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;, &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$node</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br&gt;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>Register is setup in the controller, and this is how I access the deep nested information I need. Rather then using arrays that are deep and not very understandable, or by giving an object 100 variables, such as $register->user_name, I prefer using an object for that which contains all information nesesary.</p>
<p>It should be added that this could be an potential improvement if you are working with a designer that knows just enough php to use your code and slightly modify it to make some tiny changes. For example knows that within these <?php ... ?>  something is displayed, and can then find out by looking at $node->user->name to knos what data is shown.    </p>
<img src="http://feeds.feedburner.com/~r/oldek/qtDl/~4/YLq-CCsT-KU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://oldek.se/2010/11/12/html-get-requests-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://oldek.se/2010/11/12/html-get-requests-2/</feedburner:origLink></item>
		<item>
		<title>Just now</title>
		<link>http://feedproxy.google.com/~r/oldek/qtDl/~3/0u-eJTC1Gco/</link>
		<comments>http://oldek.se/2010/11/11/just-now/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 01:46:22 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[moment]]></category>

		<guid isPermaLink="false">http://oldek.se/2010/11/11/just-now/</guid>
		<description><![CDATA[So, at this moment, realizing that I have spent a lot of time in front of my brand new iPad, downloading apps and whatever i could find interesting. I just found this app for WordPress, and really, it is amazing, I get to write my messages on my iPad. I am able to write as [...]]]></description>
			<content:encoded><![CDATA[<p>So, at this moment, realizing that I have spent a lot of time in front of my brand new iPad, downloading apps and whatever i could find interesting. I just found this app for WordPress, and really, it is amazing, I get to write my messages on my iPad. I am able to write as fast as i am on my home keyboard, even though it is a touch screen. </p>
<p>Although much time has been spent on my iPad, there has been a lot of exercising done as well, as I bought this new OCZ NIA device, which enables me to work my computer by pure brainwaves. It does sound like star wars, and it probably is, as I&#8217;ve spent some time now trying to understand it, however I am still far away from mastering it, even just slightly.</p>
<p>I did a bit of research (google) and couldn&#8217;t find anyone who really mastered this device, however I did realize the original use and why it was developed. Purely for the ones that had lost arms or were unable to control the arms to use a computer.</p>
<p>So my experience is so far that the device acts totally random, but I have had some good results some times, when I feel relaxed and not very excited. My results are greatly decresing when I have people in my surroundings, especially when they are moving around and I cant fully focus on my own.</p>
<p>This said, I do need more practise before I can give an valid opinion, and describe the product as is. Now what I can say is that; don&#8217;t expect it to work for you well enough to be used in real life situations within a month of training. It does not work as, &#8220;think of W and it will write W&#8221;, it is more like trying to learn how your arms work for the first time and you dont know what nerves and brainwaves triger the movement. You really get to work close to the core of your body, and I did read some tiny topics of brainwaves, and how they could improve your mental state.</p>
<img src="http://feeds.feedburner.com/~r/oldek/qtDl/~4/0u-eJTC1Gco" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://oldek.se/2010/11/11/just-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://oldek.se/2010/11/11/just-now/</feedburner:origLink></item>
		<item>
		<title>HTML GET Requests</title>
		<link>http://feedproxy.google.com/~r/oldek/qtDl/~3/47pefCXEbgE/</link>
		<comments>http://oldek.se/2010/10/27/html-get-requests/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 18:18:53 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://oldek.se/?p=1439</guid>
		<description><![CDATA[Sometimes when using HTML GET requests there are troubles. Some troubles might be fuzzy urls, such as &#38;x=&#8230;&#38;y=&#8230;&#38;submit=&#60;value&#62;. I googled it, and came up with a possible option that I frequently use in Zend Framework today. Basically it is a redirect I use mostly when searching. When I search I use q as the GET [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes when using HTML GET requests there are troubles. Some troubles might be fuzzy urls, such as &amp;x=&#8230;&amp;y=&#8230;&amp;submit=&lt;value&gt;. I googled it, and came up with a possible option that I frequently use in Zend Framework today.</p>
<p>Basically it is a redirect I use mostly when searching. When I search I use q as the GET variable, and this will redirect the url to &#8216;&#8230;/list/?q=My search&amp;submit=send&#8217; because Zend Framework demands a name of every element, even if submit doesn&#8217;t need a name. What is most important here is to clear out stupid looking urls, and I prefer having &#8216;/q/My search/&#8217; as it is more obvious.</p>
<p>This is what I do and I only use Zend Framework standard library.</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$params</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getRequest</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getParams</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'submit'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'submit'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_helper<span style="color: #339933;">-&gt;</span><span style="color: #004000;">Redirector</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setGotoSimple</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'list'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #000088;">$params</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>In my case I did only have the &amp;submit appended, and in this tiny function I unset the parameter submit and send the request once more, returning me to the same site &#8216;list&#8217; but with the url &#8216;&#8230;/list/q/my query/&#8217;<br />
Wonderful, and yet another saticefied customer.</p>
<img src="http://feeds.feedburner.com/~r/oldek/qtDl/~4/47pefCXEbgE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://oldek.se/2010/10/27/html-get-requests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://oldek.se/2010/10/27/html-get-requests/</feedburner:origLink></item>
		<item>
		<title>Books and knowledge</title>
		<link>http://feedproxy.google.com/~r/oldek/qtDl/~3/HR0nMb2JguY/</link>
		<comments>http://oldek.se/2010/10/22/books-and-knowledge/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 17:11:10 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://oldek.se/?p=1434</guid>
		<description><![CDATA[There&#8217;s a thing about books, they are boring, dull and yet I am still completely dependent on them. My last investment was &#8220;Zend Framework: The Official Programmer&#8217;s Reference Guide&#8221;, and as amazed I was that someone actually sat down and wrote all this. The book is amazing, and what I do like most about books [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a thing about books, they are boring, dull and yet I am still completely dependent on them. My last investment was &#8220;Zend Framework: The Official Programmer&#8217;s Reference Guide&#8221;, and as amazed I was that someone actually sat down and wrote all this. The book is amazing, and what I do like most about books is that they are always there when internet can&#8217;t bring you the information you&#8217;re looking for. At University I wasn&#8217;t very fond of books, I suppose it was due to what I was reading, by today I only read literature that can teach me something of interest.</p>
<p>If you are completely fresh and new to Zend Framework I recommend you to take the guides on youtube.com and buy the book &#8220;Pro Zend Framework Techniques: Build a Full CMS Project&#8221;. This book taught me how to structure my code as a real professional, and made me realize how I should implement the more advanced features that have seemed to be really far away.</p>
<h4>References</h4>
<p><strong>Name</strong>: Zend Framework: The Official Programmer&#8217;s Reference Guide.<br />
<strong> ISBN10</strong>: 1-4302-1906-8.<br />
<strong> Web</strong>: <a href="http://apress.com/book/view/1430219068" onclick="pageTracker._trackPageview('/outgoing/apress.com/book/view/1430219068?referer=');">http://apress.com/book/view/1430219068</a></p>
<p><strong>Name</strong>: Pro Zend Framework Techniques: Build a Full CMS Project.<br />
<strong>ISBN10</strong>: 1-4302-1879-7.<br />
<strong>Web</strong>: <a href="http://apress.com/book/view/1430218797" onclick="pageTracker._trackPageview('/outgoing/apress.com/book/view/1430218797?referer=');">http://apress.com/book/view/1430218797</a></p>
<img src="http://feeds.feedburner.com/~r/oldek/qtDl/~4/HR0nMb2JguY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://oldek.se/2010/10/22/books-and-knowledge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://oldek.se/2010/10/22/books-and-knowledge/</feedburner:origLink></item>
		<item>
		<title>Who am I?</title>
		<link>http://feedproxy.google.com/~r/oldek/qtDl/~3/lQiZkmLU2ho/</link>
		<comments>http://oldek.se/2010/10/17/who-am-i/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 15:25:12 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://oldek.se/?p=1431</guid>
		<description><![CDATA[Hello, I am Marcus, and go by the name Oldek online. The nickname inherits from an old name generator, and I believe it was 10 years ago when I was quite young and played Tibia (http://www.tibia.com). In my opinion today, this game is a very interesting game. It made me understand so many things. I [...]]]></description>
			<content:encoded><![CDATA[<p>Hello, I am Marcus, and go by the name Oldek online. The nickname inherits from an old name generator, and I believe it was 10 years ago when I was quite young and played Tibia (http://www.tibia.com). In my opinion today, this game is a very interesting game. It made me understand so many things. I was partially involved in some OpenTibia movement, which was a reverse engineering of the real Tibia, although it never actually got any large crowd, it made my senses work. As OpenTibia was just a server implementation, you had to create monsters and maps by yourself. By creating maps and following this systems development I was being introduced to what was about to become my life. I saw patters, and items became numbers and variables, I started working with XML and Lua to form my own items and characters/monsters. When I had experimented with this loosely for a year I decided to look into the code itself but got too overwhelmed. I ended up coding websites instead, leading to amazing results for almost no work at all. I have never fancied design, although I have a great interest in architecture.</p>
<p>After a few years with PHP programming it turned out that I had a project comming up. I was to develop the most advanced function I have ever heard of, and it seemed to be so hard, but still doable. I was supposed to develop an image upload and thumbnail script (I didn&#8217;t know there was any to just download) and on top of that, create an image with 4 layers with customized font and letter spacing. However, there were some commands to calculate how large each letter was and thereby be able to center the text by a formula. After many hours of no success att all I almost gave up, but it turned out that there was to be another break just before I gave up, every single time. After almost being able to render an image, I had to tell the customer that there is no way to do this. One month later I was done with the function, and it also included a caching of the images so that it woulden&#8217;t have to compute a new image every time it was shown in the page.</p>
<p>What I created was:</p>
<p><a href="http://oldek.se/wp-content/uploads/make_winner.php_.png" rel="lightbox[1431]"><img class="alignnone size-full wp-image-1432" title="make_winner" src="http://oldek.se/wp-content/uploads/make_winner.php_.png" alt="" width="220" height="150" /></a></p>
<p>What is involved is background is white, then there is an image in the first layer of a large 1 with white background. Then there is a header that explains that &#8220;First price goes to:&#8221; followed by a new text stating the winner. And there is no such thing as specifying center, or newline, everything is manually calculated.</p>
<p>The trick was:<br />
The image is generated through PHP ImageMagick (<a href="http://www.imagemagick.org/script/index.php" onclick="pageTracker._trackPageview('/outgoing/www.imagemagick.org/script/index.php?referer=');">http://www.imagemagick.org/</a>)<br />
The font is a special font, which I don&#8217;t remember<br />
The url I used to generate these was: &lt;address&gt;/class/make_winner.php?w=1&amp;n=Oldek (there is also a &amp;s=1.0 for letterspacing)<br />
This image is cached through saving the file to: save(&#8216;folder&#8217;, md5(w.n.s).&#8217;.jpg&#8217;); (function is not correct, but you get the idea with the variables).<br />
When accessing the /class/make_winner.php?w=1&amp;n=Oldek address I check if file_exists(&#8216;/img/winners/&#8217;.md5(w.n.s).&#8217;.jpg&#8217;);<br />
And if it does exists then load it instead of creating a new one.</p>
<p>Simple as that I made my first really advanced function, using library ImageMagick. However I was not able to reuse anything of what I created. Everything is trapped in that project, and if I want to do similar functions again I would use a more advanced library that enables me to develop this faster, otherwise create one myself so I can share it with others and reuse it in every project.</p>
<p>First introduction of me and who I am and what I do.</p>
<img src="http://feeds.feedburner.com/~r/oldek/qtDl/~4/lQiZkmLU2ho" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://oldek.se/2010/10/17/who-am-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://oldek.se/2010/10/17/who-am-i/</feedburner:origLink></item>
	</channel>
</rss>

