<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Peaceful Programmer &#187; open source</title>
	<atom:link href="http://blog.raymondberg.com/archives/category/programming/open-source/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.raymondberg.com</link>
	<description>A Blog that Walks the Fine Line Between Usefulness and Acrobats</description>
	<lastBuildDate>Thu, 09 Sep 2010 01:19:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>ShareItNow!!!</title>
		<link>http://blog.raymondberg.com/archives/67</link>
		<comments>http://blog.raymondberg.com/archives/67#comments</comments>
		<pubDate>Wed, 17 Dec 2008 15:52:34 +0000</pubDate>
		<dc:creator>rwb</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[ftp uploader]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.rwberg.org/?p=67</guid>
		<description><![CDATA[Has this ever happened to you? Hey, I have this thing you have to see! I&#8217;ll send ti via email, it&#8217;s 10MBs. No wait, my email service can&#8217;t handle anything that size. It&#8217;ll have to go a different way. Okay, I&#8217;ll send it over the IM client. Wait, it says you&#8217;re using a different client [...]]]></description>
			<content:encoded><![CDATA[<p>Has this ever happened to you?</p>
<blockquote><p><strong>Hey, I have this thing you have to see! I&#8217;ll send ti via email, it&#8217;s 10MBs.</strong><br />
No wait, my email service can&#8217;t handle anything that size. It&#8217;ll have to go a different way.<br />
<strong>Okay, I&#8217;ll send it over the IM client. Wait, it says you&#8217;re using a different client than me.</strong><br />
Yeah, I&#8217;m using Pidgin (read: stupid Pidgin, seeming all helpful)<br />
<strong> Okay, log into Skype and I&#8217;ll send it as a file.</strong><br />
Okay. Wait why is it only going at 500 bytes a second?!?!? Are you running Windows 3.2? (read: or Linux, har har, but seriously why do Skype file transfers blow?)<br />
<strong>Man, I&#8217;m going to have to upload it to my FTP server and send you a link. It&#8217;ll be faster. Click, click,click,click,click,click,click,click,click,click,click,click,click,click,clickity-clickity-click. Okay, here&#8217;s the link.</strong><br />
Man&#8230;..that sucked so bad.</p></blockquote>
<p>I can imagine you, the reader, sitting in your seat and sobbing into a pillow at this point, &#8220;<strong>Yes, yes I was there&#8230;.I had to send him a burnnn&#8230;.a burrnnn&#8230;a burned cd!!!</strong>&#8221; Well, maybe it wasn&#8217;t that bad.</p>
<p>So in my own way I fixed it for myself. ShareItNow is a python script that you drag files onto and it will automatically upload said files to the FTP site of your choice and give you a URL to give to your friends and family. It&#8217;s simple, but it&#8217;s not bad. You do need Python, an FTP server, and a Webserver, but that&#8217;s what I have so too bad if you don&#8217;t.</p>
<p>Just edit the script to change the value of your server location, credentials, and a web folder the server points to and you will be golden. Once you drag a file or files onto the script it will ask you if each file is binary before uploading. Once it&#8217;s done with an upload it will print you a URL that you can use and go on to repeat the process for any additional files.</p>
<p>One last thing, to make Python scripts &#8220;Droppable&#8221; (meaning you can drag-and-drop a file onto a script to get some magical result) you need to enable a little switch in the registry. I added a .reg file to the project zip using the code in <a href="http://mindlesstechnology.wordpress.com/2008/03/29/make-python-scripts-droppable-in-windows/" target="_blank">a tutorial on how to make droppable Pyscripts</a>. The funny thing is that this guy wanted to do the same thing I did, but he didn&#8217;t share his code. Great minds think alike, I guess.</p>
<p>But I share my code  (<a href="http://blog.rwberg.org/wp-content/uploads/2008/12/shareitnow.zip">Download ShareItNow</a>)   ;D</p>
<p><span id="more-67"></span>ps. before I get spammed, this is just &#8216;A&#8217; solution. I need to share files frequently for school or work, so this is a nice option. I&#8217;ll probably improve it later by adding a &#8220;Do you want to delete?&#8221; question after you&#8217;ve finished all the uploads to auto delete the uploaded files after the other person grabs them.  But for now, &#8220;be cool&#8221;.</p>
<p>I&#8217;m also expecting that you create an FTP account that you use just with this service. That&#8217;s the way it should be done! <a href="http://blog.rwberg.org/archives/11">Remember to mind the keys</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.raymondberg.com/archives/67/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Exceptions &#8211; Ihhhdiot</title>
		<link>http://blog.raymondberg.com/archives/36</link>
		<comments>http://blog.raymondberg.com/archives/36#comments</comments>
		<pubDate>Fri, 01 Aug 2008 11:53:14 +0000</pubDate>
		<dc:creator>rwb</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[exceptions]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[security hole]]></category>

		<guid isPermaLink="false">http://blog.rwberg.org/?p=36</guid>
		<description><![CDATA[My developer friend, Scott Sloan, has been working on his DB class for some time now and it&#8217;s quite a useful tool for doing queries simply. Part of the ongoing movement, between him and myself, is designing a rock-solid set of framework classes that will aid in rapid PHP development. Of course, his project has [...]]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://www.twodeadpixels.com/" target="_blank">developer friend</a>, <a href="http://www.devscott.org" target="_blank">Scott Sloan</a>, has been working on his DB class for some time now and it&#8217;s <a href="http://www.codeandchai.net/?p=20#respond" target="_blank">quite a useful tool</a> for doing queries simply. Part of the ongoing movement, between him and myself, is designing a rock-solid set of framework classes that will aid in rapid PHP development. Of course, his project has some stuff to show for it while mine are still awaiting a beta release. But I really do love this class and others from Scott, and I use them in Droplet and contribute as I find need to break them. <img src='http://blog.raymondberg.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>The most recent change to this DB class was the addition of exception based error handling, making database connections an entirely simpler creature to deal with. This class does a lot of abstraction, and up until now it&#8217;s been virtually impossible to debug it, or any db interactions, without stack traces. Unfortunately, every silver lining comes with a dark cloud.</p>
<p>This cloud, not dealing with Scott, happens to be PHP&#8217;s development traditions. Just like most functionality, exceptions are good, maybe even necessary, but the implementation of them was very poor from a security perspective. The fact that you can&#8217;t disable the printing of the stack trace from an uncaught exception is inexcusable at best. But I can guess how that conversation went:</p>
<blockquote><p>-Should we have an option to disable stack printing (specifically of method parameter values) for select Exceptions?<br />
-Why?<br />
-Well, maybe they wouldn&#8217;t want the end user to see what was passed in a particular method?<br />
-But you just catch the exception!<br />
-But what if you don&#8217;t catch the exception? They see everything!<br />
-Are you suggesting that we write code to protect programmers who are breaking rules? Plus, all production servers have warnings/errors disabled for output, unless their people are idiots.<br />
-Oh&#8230;.I suppose you&#8217;re right.</p></blockquote>
<p>Here&#8217;s my beef: you need to plan on some mistakes. No offense, but haven&#8217;t you ever forgotten to catch an exception? Since this is a scripting language, you don&#8217;t have the parental compile time warnings or blocks, like Java, to say &#8220;Yo, you didn&#8217;t tell me to do anything when this code freaks, and believe me it can. Fix yo&#8217; code, homes.&#8221; (I assume that a PHP compiler would use a similar compile error vernacular). The reality is that there are many production systems that don&#8217;t hide warnings/errors, and even if they did you wouldn&#8217;t want password information getting written to a log file whenever you fail to connect to a database.</p>
<p>The key here is a &#8220;who needs to know&#8221; system, just like I talked about in my <a href="http://blog.rwberg.org/archives/11" target="_blank">blog entry about keys.</a> There should never, ever, ever,ever,ever be a way for the language to &#8220;accidentally&#8221; print a system password to a user. Even if the developer is a complete idiot! If he passes a password or hash into a function,  he&#8217;s not going to think about what would happen if that function would error. He&#8217;ll fix that when it happens. It probably sounds like I&#8217;m defending the Cro-Magnon programmers of the world, but I&#8217;m not&#8230;..really.</p>
<p>An even worse PHP prospect is the ability to dump a class with private class values onto a page with one motion (i.e. var_dump). I know that these are all helpful tools in debugging, and that private variables were never meant to be a security constraint in this fashion, but the way they did it DOESN&#8217;T MAKE SENSE!! That function should not, I repeat &#8216;NOT&#8217;, be able to print private access variables unless there are appropriate accessor functions. That&#8217;s what object oriented design is all about.</p>
<p>I wouldn&#8217;t be so hard on PHP if it weren&#8217;t for the fact that these examples are the ones that give PHP a bad name. When someone&#8217;s data gets stolen on a PHP site it isn&#8217;t that PHP is a bad language, it&#8217;s that the programmer wasn&#8217;t thinking about that specific hole. But there are a lot of spots where developers can not know the rules, or forget a step and accidentally release loads of information to an eager hacker. As part of the group defining how the tool gets made, <em>we need to be careful that the tool doesn&#8217;t have a cigar cutter that&#8217;s big enough for our &#8220;baby developers&#8221; to fit their arms in</em>.</p>
<p>Anyways, code smarter not harder!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.raymondberg.com/archives/36/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Steps into Open Source</title>
		<link>http://blog.raymondberg.com/archives/27</link>
		<comments>http://blog.raymondberg.com/archives/27#comments</comments>
		<pubDate>Wed, 09 Jul 2008 20:40:40 +0000</pubDate>
		<dc:creator>rwb</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[php project]]></category>

		<guid isPermaLink="false">http://blog.rwberg.org/?p=27</guid>
		<description><![CDATA[A new section of my personal website has just been opened and will hopefully see a lot of growth in the coming years: the Open Source Section. While I&#8217;ve been contributing for a while to a colleague&#8217;s open-source projects, this is my first time creating my own projects from the ground up. I&#8217;ve described my [...]]]></description>
			<content:encoded><![CDATA[<p>A new section of my personal website has just been opened and will hopefully see a lot of growth in the coming years: <a href="http://rwberg.org/oss/index.php?t=HOME">the Open Source Section</a>. While I&#8217;ve been contributing for a while to a colleague&#8217;s open-source projects, this is my first time creating my own projects from the ground up.</p>
<p>I&#8217;ve described my reasons for opening this section on the home page and a few others, but it&#8217;s really important to hear. Actually, I&#8217;ve been really hesitant to make my code <a href="http://en.wikipedia.org/wiki/Open_source">open source</a> for a while now, but I realize that it&#8217;s not acceptable. After about a year of thinking about it and finding out what my problems were, I&#8217;ve decided that it&#8217;s in my best interest to break out and try it. That&#8217;s not to say that I didn&#8217;t have valid reasons to hold me back.</p>
<p>My first concern was credit. While I&#8217;m not terribly attached to my code, like other programmers I do feel the need to be at least partially recognized for the work I&#8217;ve put in to it. To be honest, it&#8217;s from a long line of experiences I&#8217;ve had where people have been unsupportive of hours of work or ideas that I&#8217;ve created. I&#8217;ve grown to hate the idea of someone devaluing or stealing my work. Unfortunately, this has lead me down the path to the <a href="http://en.wikipedia.org/wiki/Sith">Dark Side</a>(<a href="http://en.wikipedia.org/wiki/Microsoft">see also</a>) of proprietary ideas and opening myself to other opinions.</p>
<p>The fact of the matter is that I&#8217;ve <a href="http://subversion.tigris.org/">benefited</a> <a href="http://www.google.com/url?sa=t&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fwww.en.wampserver.com%2F&amp;ei=4h91SNXqFYOEiAHM7JyAAQ&amp;usg=AFQjCNH7g8s5VQuHVKf93JbV9Tlvw36i4Q&amp;sig2=820IVYfi-YH8I48WTBoyeQ">from</a> <a href="http://www.gnupg.org/">other</a> <a href="http://us2.php.net/manual/en/faq.general.php">tools</a> in my work but I&#8217;ve never credited the developers then. But there&#8217;s a reason why that&#8217;s okay. It&#8217;s not about the programmer(s)&#8230;it&#8217;s about the code. While every programmer wants to make a life out of this, it&#8217;s not appropriate to take every little action and demand credit for it. If I write something pretty nice, which isn&#8217;t quite likely, maybe someone will use it and tell a friend about it: &#8220;<a href="http://sixrevisions.com/tools/firefox_web_developer_extension_toolbar/">this is pretty nice</a>&#8220;. If I need credit, I can my potential employer &#8220;I did this&#8221; or &#8220;I contributed to this&#8221;. But notice that the pride is in the finished product and you can enjoy your work on it&#8230;not on the casual afternoon of programming that you have the urge to brag about. I&#8217;ve been guilty of this a thousand times over.</p>
<p>The other issue is code quality. While I like to think of myself as a pretty solid programmer, I&#8217;m definitely <a href="http://badprogrammer.infogami.com/">not comfortable with showing my code</a> off to the world. Actually, my first project, <a href="http://rwberg.org/oss/index.php?t=PHP&amp;pj=droplet&amp;">Droplet</a>, saw a complete redesign the day before I put it online because I was worried about what my <a href="http://www.devscott.org/">peers</a> might think of my half-decent code. After reading Jeff Atwood&#8217;s post <a href="http://www.codinghorror.com/blog/archives/001134.html">on programmers who fear outside eyes</a>, I realized that I was part of my own problem and that this was a good way to break out of that.</p>
<p>In any case, I hope that you check out the open source website and try out <a href="http://rwberg.org/oss/index.php?t=PHP&amp;pj=droplet&amp;">Droplet</a>. I really have enjoyed using the software and I hope you do the same. It&#8217;s not pretty, and it&#8217;s not a money-maker&#8230;but it&#8217;s a nice tool that you can share with everyone. Please share your comments and suggestions, and write a few lines of code yourself&#8230;I&#8217;m still waiting on my first user-submitted patch!</p>
<p>If Droplet isn&#8217;t your <a href="http://en.wikipedia.org/wiki/Earl_Grey_tea">cup of tea</a>, I have a few more on the way including a couple PHP classes and a fun few items in Java.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.raymondberg.com/archives/27/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
