tag:blogger.com,1999:blog-30124874142542299462009-07-12T02:49:50.488-05:00infectmac"Je n'ai fait celle-ci plus longue que parce que je n'ai pas eu le loisir de la faire plus courte." -Blaise PascalEvan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.comBlogger35125tag:blogger.com,1999:blog-3012487414254229946.post-54905535595233647392009-06-22T02:50:00.004-05:002009-06-22T03:27:28.064-05:00Dial-THE-JokeI spent some time this weekend working on my <a href="http://dialthejoke.appspot.com/"><b>Dial-THE-Joke</b></a> application. The idea is certainly not original. I first learned about these systems when I saw <a href="http://www.imdb.com/title/tt0168122/">Pirates of Silicon Valley</a>. It accepts user submitted jokes and those jokes are then voted on. The joke with the most votes will be the played when you call <b>425-440-0035</b>. <div><br /></div><div>I built it with <a href="http://www.twilio.com/">twilio</a> and <a href="http://code.google.com/appengine/">GAE</a>. It's the first real app I built with twilio. It only uses the "say" verb so I still have a lot to learn about the twilio system. But I do have another app I plan on building during the evenings and weekends ahead. It's slightly more complicated but I think it will be a bit more amusing. </div><div><br /></div><div>For those that are interested the source code can be found here: <a href="http://code.google.com/p/dialthejoke/">http://code.google.com/p/dialthejoke/</a></div><div><br /></div><div>P.S.</div><div>The next order of business is to clean up the source code!</div><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-5490553559523364739?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-49841460633742525102009-06-12T02:33:00.003-05:002009-06-12T02:42:09.800-05:00Friday is a BIG dayToday is going to be an important day in history. Not only is <a href="http://www.npr.org/templates/story/story.php?storyId=105263207">analog TV</a> going the way of the, the, the dodo bird, but facebook is going to allow all of us to choose a user name! Tomorrow at 9:01pm PST you can see be at <a href="http://www.facebook.com/evan">www.facebook.com/evan</a>.<br /><br />It's also the birthday of the <a href="http://en.wikipedia.org/wiki/George_H._W._Bush">41st</a> president. Make sure you pay your new taxes!<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-4984146063374252510?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-86051877072798458862009-06-01T03:44:00.003-05:002009-06-01T03:57:26.452-05:00bing it onEven some of the cool kids over at <a href="http://news.ycombinator.com/item?id=635540">hacker news</a> think <a href="www.bing.com"><span class="blsp-spelling-error" id="SPELLING_ERROR_0">bing</span></a> is <span class="blsp-spelling-error" id="SPELLING_ERROR_1">ok</span>.<br /><br />I am not smart enough to tell you which search engine is better from an empirical standpoint but if you execute these two queries:<br /><br /><a href="http://www.bing.com/search?q=django+gps&amp;go=&amp;form=QBRE">http://www.bing.com/search?q=django+gps&amp;go=&amp;form=<span class="blsp-spelling-error" id="SPELLING_ERROR_2">QBRE</span></a><br /><a href="http://www.google.com/search?q=django+gps">http://www.google.com/search?q=django+gps</a><br /><br />You will notice that on <span class="blsp-spelling-error" id="SPELLING_ERROR_3">bing</span> I am the third result and on Google I am the eighth (at the time of posting).<br /><br />I would like to thank Microsoft for releasing <span class="blsp-spelling-error" id="SPELLING_ERROR_4">bing</span> on my birthday (22 years of age). Many great things have happened on June 1st. I was born. My parents got married (before I was born). Heidi <span class="blsp-spelling-error" id="SPELLING_ERROR_5">Klum</span> was born. Marilyn Monroe was born. And Ronnie Wood was also born. And CNN came to be. Don't forget CNN the most trusted name in news. So maybe <span class="blsp-spelling-error" id="SPELLING_ERROR_6">bing</span> is just meant to be a <span class="blsp-spelling-corrected" id="SPELLING_ERROR_7">success</span>.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-8605187707279845886?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-72749816586513011632009-05-31T03:38:00.002-05:002009-05-31T03:46:15.266-05:00maxed outI am watching <a href="http://en.wikipedia.org/wiki/Maxed_Out">maxed out</a> right now. I place people who work in billing and collection agencies below lawyers and insurance agents.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-7274981658651301163?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-67959698159097508272009-05-27T00:58:00.006-05:002009-05-27T09:50:05.610-05:00twitter searchObama nominated <a href="http://en.wikipedia.org/wiki/Sonia_Sotomayor">Sotomayor</a> to the supreme court today but the top twitter trend as of now: <a href="http://search.twitter.com/search?q=%233wordsaftersex">#3wordsaftersex</a>.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_X_vKFw1VWsc/ShzZXKvwBaI/AAAAAAAAAJQ/q6K1X-rd7OA/s1600-h/twitter_trends_1.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 236px;" src="http://3.bp.blogspot.com/_X_vKFw1VWsc/ShzZXKvwBaI/AAAAAAAAAJQ/q6K1X-rd7OA/s320/twitter_trends_1.PNG" alt="" id="BLOGGER_PHOTO_ID_5340382250199418274" border="0" /></a>I do understand twitter search. So far I actually like twitter search. I find somewhat interesting blog posts (on technical things) that I probably would not have found otherwise. I don't know what twitter plans to do with search (fight Google?). I could see how they could win. It would be nice if the searches were sorted by "relevance" instead of most recent post. Grouping common tweets together and categorizing them might be nice but I honestly don't know if I would like that.<br /><br />The power of these tweets seem to be the links and keywords and the time context. Perhaps mining the tweets would be a better way to <a href="http://en.wikipedia.org/wiki/Google_Image_Labeler">label images</a>? Or label websites, videos, blogs, and news items that the tweets link to.<br /><br />Just some thoughts. I guess I sort of get twitter now.<br /><br /><span style="font-weight: bold;">Update (question and answer):</span> <a href="http://twitter.com/lazytweet">http://twitter.com/lazytweet</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-6795969815909750827?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-1116727859794429862009-05-11T22:11:00.004-05:002009-05-27T01:22:31.917-05:00Leveraging Web 3.0I really really really REALLY dislike the world: "leverage." And nothing I say below can be supported with any form of evidence.<br /><br />if(NotWillingToReadBlogPost()) goto Error;<br /><br />I read over an article a few weeks ago and it mentioned "Web 3.0" and I figured it was a misprint. But now I know! It's true Web 3.0 is HERE! It has a <a href="http://computer.howstuffworks.com/web-30.htm">HowStuffWorks</a> page so it has to be real. Web 2.0 branding was silly in my opinion. Web 3.0 feels like the same story all over again. The story goes like this: 1. Get idea 2. Create application 3. Make money. The problem was with parts 1 and 3. Nobody had a problem with 2. How many social networks do we have? I can think of 4 ways I could have updated my status at one point: <a href="http://www.twitter.com/">twitter</a>, <a href="http://www.facebook.com/">facebook</a>, <a href="http://www.plurk.com/">plurk</a>, and <a href="http://www.pownce.com/">pownce </a>(RIP). There were a few ideas and then a lot of derivations that added little value. Even Google was not original at face value. It just did search a whole lot better than Alta Vista. Better meaning non-technical people thought it was better. Honestly, how many people really care about PageRank? At this point it's Mac vs PC what's the real difference for the <span style="font-style: italic;">average</span> consumer. I am writing this on Windows XP Pro. I could also have written this on a Mac. Or even written it with pen and paper and sent it to the op-ed column in the newspaper. I probably would have been just as satisfied. But instead I chose to post it on the internet so it could come back to haunt me later on in life.<br /><br />I have gotten sufficiently off topic now. Back to Web 2.0. We had lots of ideas but they were just too similar. We had lots of implementations. What makes a good idea? I personally have NO idea. And to be honest I don't think most people do. Ideas that turn into succesful products are probably <a href="http://www.amazon.com/Just-Fun-Story-Accidental-Revolutionary/dp/0066620732/ref=pd_sim_b_1">accidents</a> and probably not original. From that perspective having lots of ways to update my status is a good thing. One of them will end up winning in the end. Or they will all die simply because I don't really like updating my status. I do it. But I feel like a part of me dies each time I do.<br /><br />There is one way I can probably guarentee an idea is bad. If your idea is broad it is certainly doomed to failure: "This is a Web 2.0 application that will enable businesses to connect with clients." I don't know what "connect" means. Is this email? Rolodex and a telephone? What is Web 2.0? There is no true definition of Web 2.0. So the idea has left two things undefined: "Web 2.0" and "connect." This is really import especially when you want people to actually use your software.<br /><br />Now Web 3.0. Same stuff different package but it's semantic. (Does that mean I don't have type errors popping up in firebug anymore? Probably not.)<br /><br />This is just like using the word "leverage." Just say something like: "I am planning on leveraging existing resources to enable the solution for our customers problem." It's an emtpy statement that sounds good like you might have your shit together. But I personally hate it. Lets see if I can come up with another. Here: "Our product will enable users to create SaaS Web 3.0 application that leverage a new cloud infrastructure at zero transition cost from their existing centralized solutions." I will never go into marketing.<br /><br />Error:<br />I wrote this quicky and I ended up reminding myself of the following talk: <a href="http://www.ni.com/niweek/2008/keynote/discovering_innovation_through_the_network.htm">http://www.ni.com/niweek/2008/keynote/discovering_innovation_through_the_network.htm</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-111672785979442986?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-29999929749273026232009-04-14T22:06:00.003-05:002009-04-14T22:14:47.933-05:00UMN to use Google Apps<span style="font-family: georgia;">I </span><span style="font-family: georgia;font-family:&quot;;color:black;" >didn't know I had a "</span><span style=";color:black;" >University of Minnesota Google Team Edition space" account but I guess it's good the University of Minnesota has given up on trying to write their own web based email client because every single one sucked. I began college using Thunderbird and ended having everything forwarded to my Gmail account.<br /></span><blockquote style="font-family: georgia;"><p><span style=";color:black;" >You're receiving this e-mail because you have an account in the existing University of Minnesota Google Team Edition space. We want to make you aware that the new University of Minnesota Google initiative is underway, and the project will require some changes to your current University Google account, in order to provide the benefits of Google to a wider University audience. </span></p> <p><span style=";color:black;" >As a pioneer in the use of Google Apps for use at the University, you’ve had a chance to see the opportunities for collaboration and partnership that the Google tools offer. In addition, you've contributed to the increasing awareness of the potential for Google Apps throughout the University community. </span></p> <p><span style=";color:black;" >Because of this increased awareness and interest, the University's Google initiative was established to make Google Mail and Google Apps available as an option for all students, faculty and staff beginning fall 2009. Those who opt-in at that time will be able to use Gmail as their official University e-mail account as well as take advantage of many of the collaborative tools provided by Google Apps.</span></p> <p><span style=";color:black;" >How will this affect you? </span></p> <p><span style=";color:black;" >The University will switch from the current Google Team Edition, which does not include e-mail and provides a limited number of applications, to the Education Edition, which includes Gmail and additional applications, as well as administrative tools that make it more appropriate for use by the University at large. </span></p> <p><span style=";color:black;" >On Monday, April 27 the Google initiative project team will become the administrator of the University's Google space and take responsibility for account setup and maintenance. As a result, there will no longer be the ability for users to invite new users into that space, and no new accounts will be created until Google's fall implementation. Be assured that you will still be able continue to use Google Apps to create and share documents with the users within the University of Minnesota space as we make this transition. </span></p> <p><span style=";color:black;" >We expect to make the transition to the Education Edition early this summer. At that time, you will be asked to read and agree to new user terms and conditions that will provide more legal, regulatory, and technical safeguards for University information stored with Google, and defines your rights and responsibilities as a user in language and terms that are appropriate to a University environment. After you have agreed to the new terms and conditions, you will log into your University Google account with your University Internet ID and password through a standard University login page. An exact date for these changes has not yet been set, but we will keep you updated as we refine our schedule.</span></p> <p><span style=";color:black;" >These changes will not affect the information you have in the existing Google space. If you choose to remove or transfer any of the information you have created and stored there, visit the </span><a href="http://google.com/support/a/users/" target="_blank"><span style="">Google Apps support site</span></a><span style=";color:black;" >. If you are no longer using your Google account in the <a href="http://umn.edu/" target="_blank">umn.edu</a> space, and don’t intend to opt in this fall, please let us know and we will delete the account. </span></p> <p><span style=";color:black;" >We are confident that these changes will streamline enterprise communication and collaboration at the University. We will periodically update you on the progress of the project and inform you in advance before we make any changes that affect your account. If you have questions or concerns, please see the Google Initiative Web site at </span><a href="http://oit.umn.edu/google-initiative" target="_blank"><span style="">oit.umn.edu/google-initiative</span></a><span style=";color:black;" >. If you don't find answers to your questions there, please contact the team at </span><a href="mailto:gpilot@umn.edu" target="_blank"><span style="">gpilot@umn.edu</span></a><span style=";color:black;" >. </span></p> <p><span style=";color:black;" >Thank you,</span></p> <span style=";color:black;" >The Google Apps Initiative Project Team</span></blockquote><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-2999992974927302623?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-88912641425622264172009-04-06T01:17:00.006-05:002009-05-27T01:31:33.716-05:00Happy Birthday Fokker<a href="http://en.wikipedia.org/wiki/Anthony_Fokker">Anthony Fokker</a> would be celebrating his 119th birthday today. He was an aircraft engineer and apparently responsible for the <a href="http://en.wikipedia.org/wiki/Anthony_Fokker#The_interrupter_gear">interrupter gear</a>. Which in short, allowed for machine guns to shoot through the propeller blades without destroying them.<br /><br />Why is this cool? It's synchronization. Threads. Locks. Hurray. Except this synchronization problem involves guns and airplanes. I am sure those <a href="http://en.wikipedia.org/wiki/Dining_philosophers_problem">philosopher's</a> are having an interesting conversation but I don't think it compares to the Fokker problem. I wanted to rush off and implement this in Fokker's honor. Now, since I don't own a gun or an airplane a <a href="http://github.com/evanlong/evan-public-development/blob/acfa9ee64470f477bc1b715fb361c4f695d37788/fokker/fokker.py">python program</a> will have to suffice.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-8891264142562226417?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-48186506689045142112009-03-17T22:23:00.003-05:002009-05-27T01:32:21.696-05:00Rough Day in the MarketI am told the economy is not doing well. But I didn't realize how bad it was until today. On Google Finance I have a fake portfolio I like to play with. Here is a screenshot of what happened after I tried to "buy to cover."<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_X_vKFw1VWsc/ScBrbnCR53I/AAAAAAAAAIY/DDo96Ypxm2U/s1600-h/rough_day_in_the_market+%28Medium%29.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 299px;" src="http://2.bp.blogspot.com/_X_vKFw1VWsc/ScBrbnCR53I/AAAAAAAAAIY/DDo96Ypxm2U/s320/rough_day_in_the_market+%28Medium%29.PNG" alt="" id="BLOGGER_PHOTO_ID_5314365682376370034" border="0" /></a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-4818650668904514211?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-5767274834809235042008-11-03T11:42:00.003-06:002008-11-03T12:09:09.197-06:00Obama WinsIt's not even election day yet. But based off of absentee and early voting I am calling the 2008 presidential election for Barack Obama. The election isn't too close to call because I called it. End of story<br /><br />Remember you heard it here first. Although, I know the election isn't officially over until Fox News calls it (It's true look at Article 8 of the Constitution).<br /><br />Predictions:<br />States that are close but will go for Obama: Montana, Indiana, North Carolina, North Dakota, Missouri, and Ohio.<br />Barkley - beats Al Franken and Norm Coleman<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-576727483480923504?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-47412600930767446172008-11-02T18:06:00.003-06:002008-11-02T18:15:19.386-06:00Why being a computer science major can suck......the people. Here is a question somebody asked on a class forum. I really hope they meant to be funny:<br /><br />Professors response to the acceptable size of paper for notes used during an exam:<br />"Let me clarify. Two pieces of A4 paper. Fourth sides. Hand writing notes. "<br /><br />Students response:<br />"Hmm... since wikipedia states that A4 paper is '8.3 ? 11.7 inches', I assume this means 8.5 x 11" will also suffice (where do one obtain "A4" paper around here?)"<br /><br />TA's response:<br />"That is the most ridiculous question I have seen in my 25 years of existence. It even beats some of the other questions one hears in the election rallies these days. My official response to it is that I am going to go off to bed now as I have an early morning lecture to attend."<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-4741260093076744617?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-80032320079110460152008-09-20T12:30:00.003-05:002009-05-27T01:32:21.696-05:00acceptable sourcesI recently thought of a very good smart ass question I never asked in high school or any of the <span style="font-style: italic;">Introduction to</span> classes in college. Everybody at some point has done a simple research report. It typically ends up requiring you to write about a topic where somebody else has done all the real research. Really it's nothing more than a formal summary. In the assignment guidelines there is usually some list of acceptable sources. It might look something like this (order best to worst):<br /><ol><li>Primary Research (although it is usually out of the scope of these types of assignments)</li><li>Scientific Articles</li><li>Books</li><li>Magazines that stay current with the subject matter<br /></li><li>Encyclopedias</li><li>Websites (Stick with .org and .gov domain names because they are more reputable)</li></ol>And then this list will be follow by some note about: DO NOT USE WIKIPEDIA AS A SOURCE. Finally my wonderful question: "So if any old .org domain is acceptable why is wikipedia.org not acceptable?" At least wikipedia cites their sources.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-8003232007911046015?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-45103388343798981982008-09-06T11:19:00.002-05:002009-05-27T01:33:02.971-05:00in 5 years...I wrote this email to a friend on February 4th, 2008. Just a list of my predictions for the next 5 years:<br /><br />So within <span class="nfakPe">5</span> <span class="nfakPe">years</span> I think:<br /><blockquote><br />1. XMPP will be the protocol for real-time web apps<br />2. Browsers will have javascript implementations that go through a JIT. Microsoft actually has this working. They have javascript working on their DLR (which is the newer virtual machine for dynamic languages).<br />3. People may implement their own virtual machines <span class="nfakPe">in</span> the javascript just so they can easily port existing code to the web. (This point is a big maybe but could be cool)<br />4. Erlang will be cool partly because of the XMPP server that is written <span class="nfakPe">in</span> erlang.<br /><span class="nfakPe">5</span>. And facebook will have gone public.<br /><br />So now you know and are my witness.<br /><br />Evan<br /><br /></blockquote><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-4510338834379898198?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com3tag:blogger.com,1999:blog-3012487414254229946.post-88077744124059380222008-08-29T12:17:00.008-05:002009-05-27T01:32:21.697-05:00IE8 gopher bugIE8 has a wonderful bug. If you type in gopher.com into the address bar IE will take you to gopher://gopher.com. Every other browser takes you to http://gopher.com but Microsoft still values the gopher protocol and defaults to that protocol for any URL typed into the address bar that starts with gopher.<br /><br />Before:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_X_vKFw1VWsc/SLgwZEp6kUI/AAAAAAAAAHk/nVqn7Guv5nw/s1600-h/ie-1.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_X_vKFw1VWsc/SLgwZEp6kUI/AAAAAAAAAHk/nVqn7Guv5nw/s320/ie-1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5239991373749981506" /></a><br /><br />After:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_X_vKFw1VWsc/SLgw_2CjmPI/AAAAAAAAAHs/sx_FMfRGqgQ/s1600-h/ie-2.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_X_vKFw1VWsc/SLgw_2CjmPI/AAAAAAAAAHs/sx_FMfRGqgQ/s320/ie-2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5239992039841700082" /></a><br /><br />Update:<br />It looks like this will work for any protocol (ftp, gopher, etc).<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-8807774412405938022?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-38064770606381072122008-08-29T09:55:00.007-05:002008-08-29T13:29:54.749-05:00Beginnings of a GPS AppI just wanted to share the basics of my GPS app. Right now users have to be added with the django admin interface. As of now there is no security. Anybody can get/set another user's position (trying to keep it as simple as possible). The main page will poll the server every 3 seconds and update the marker position on the google map. I have tried this app using my laptop and a USB GPS device while walking around outside and it does work reasonably well except that you have to have a wireless connection.<br /><br /><a href="http://infectmacfiles.googlepages.com/gpsapp.zip">Here is a zip containing the project</a>. The gpsgame folder contains the django project. The gpsgameclient folder contains a python client that will send your current location to the server from any <a href="http://gpsd.berlios.de/">gpsd</a> compatible device.<br /><br />Below is a screenshot of the main page. In the first text box you'll have to type the name of the user you wish to monitor. If you want to manually set the users position you can type in the GPS coordinates into the other text boxes and click save.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_X_vKFw1VWsc/SLg_U-vtRKI/AAAAAAAAAH0/PflD-QgJkEw/s1600-h/map.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_X_vKFw1VWsc/SLg_U-vtRKI/AAAAAAAAAH0/PflD-QgJkEw/s320/map.png" alt="" id="BLOGGER_PHOTO_ID_5240007796118602914" border="0" /></a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-3806477060638107212?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-81003986875634693062008-08-15T21:29:00.004-05:002008-08-15T21:37:48.106-05:00Twitter API Documentation appears to be hackedThe <a href="http://groups.google.com/group/twitter-development-talk/web/api-documentation">twitter api documentation on google groups</a> appears to have been hacked. All the links forward to porn. <br /><br />Here is a screenshot:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_X_vKFw1VWsc/SKY85CvWvHI/AAAAAAAAAHU/6sFrwWDUSIs/s1600-h/twitter.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_X_vKFw1VWsc/SKY85CvWvHI/AAAAAAAAAHU/6sFrwWDUSIs/s320/twitter.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5234938567550483570" /></a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-8100398687563469306?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com1tag:blogger.com,1999:blog-3012487414254229946.post-71709588960402760932008-08-10T13:38:00.004-05:002008-08-10T13:53:11.139-05:00stanford btree problems: hasPathSumI decided to go through some of the <a href="http://cslibrary.stanford.edu/110/BinaryTrees.html">Stanford Btree problems</a>. Today I wrote a solution to the hasPathSum problem and part of the printPaths problem in SML. My solution will take a binary tree and return a list of all the paths that will sum to the given sum. A path starts at the root and ends at the descendant whose integer value adds to the sum.<br /><br /><pre name="code" class="python"><br />datatype itree = Node of itree * int * itree<br /> | Leaf<br /><br />val mytree = Node(<br /> Node(<br /> Node(<br /> Node(Leaf,~3,Leaf),<br /> 2,<br /> Node(Leaf,12,Leaf)),<br /> 4,<br /> Leaf),<br /> 1,<br /> Node(Node(Leaf,15,Leaf),<br /> 3,<br /> Leaf))<br /><br />(*<br /> -should handle positive/negative weights<br /> -should find all paths in the tree that are equal to this sum<br />*)<br />fun hasPathSum root sum =<br /> let<br /> fun search (Node(left,i,right)) path accum all_paths =<br /> let<br /> val new_path = (i::path)<br /> val new_accum = (accum + i)<br /> val get_left_paths = search (left) (new_path) (new_accum)<br /> val get_right_paths = search (right) (new_path) (new_accum)<br /> val new_all_paths = if sum = new_accum then <br /> ((rev new_path)::all_paths)<br /> else<br /> all_paths<br /> in<br /> get_right_paths (get_left_paths new_all_paths)<br /> end<br /> | search (Leaf) (_) (_) (all_paths) = all_paths<br /> in<br /> search (root) ([]) (0) ([])<br /> end<br /><br />hasPathSum (mytree) (4) (*result: [[1,3], [1, 4, 2, ~3]] *)<br />hasPathSum (mytree) (1) (*result: [[1]]*)<br />hasPathSum (mytree) (1024) (*result: [] *)<br /></pre><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-7170958896040276093?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-78391247441222064102008-08-02T17:15:00.003-05:002008-08-02T17:40:03.589-05:00RESTful PythonMy end goal is to make a tool that allows developers to describe their REST API in some sort of markup and then generate libraries that communicate with the server. The tool would generate language specific libraries that abstract away communication with the server. I also hope to provide someway to map between the XML/JSON that the server returns and objects that are defined by the user. I think the real benefit of this will be that developers won't have to write a new library for each language they wish to support on the client side. It seems like the community is responsible for building libraries for the different languages but it would be nice if it were a little more streamlined. <br /><br />This snippet of code is simple but just the start. It just allows a way to use a python decorator to define the services interface and then the user can use the decorated function to actually communicate with the server. At the bottom I have already defined a couple of functions using the <a href="http://groups.google.com/group/twitter-development-talk/web/api-documentation">Twitter</a> and <a href="http://pownce.pbwiki.com/API%20Documentation2-0">Pownce</a> APIs.<br /><br /><pre name="code" class="python"><br />import urllib<br />import re<br /><br />class WebApiOpener(urllib.FancyURLopener):<br /> '''<br /> Provides a way for HTTP Basic authentication to take place without<br /> prompting the user for a username and password like FancyURLopener<br /> would.<br /> '''<br /> def __init__(self, username, password):<br /> urllib.FancyURLopener.__init__(self,{})<br /> self.username = username<br /> self.password = password<br /> <br /> def prompt_user_passwd(self, host, realm):<br /> return (self.username,self.password)<br /><br />def webcall(**apiargs):<br /> '''<br /> Decorator that is used to create a python function that communicates with<br /> a RESTful web service. The function it generates will be able to to do HTTP<br /> basic authorization. The generated function only accepts a keyword <br /> arguments. The following are reserved arguments:<br /> auth_username, string optional, only needed if web service needs <br /> basic HTTP auth<br /> auth_password, string optional, only needed if web service needs<br /> basic HTTP auth<br /> All other arguments will be used to first replace variables within the url<br /> and the remaining arguments will be passed as part of the parameter string.<br /> Take a look at the documentation below and the examples to get an idea of <br /> how to define variables within the url string. <br /> <br /> webcall Arguments: apiargs, keyword list of arguments<br /> apiargs['url'], string, The url of the web service. Specify variables <br /> for within the url like this: {var_name=default_value} or {var_name}. <br /> These will be filled in when the user actually calls the decorated <br /> function.<br /> <br /> apiargs['method'], string optional, Defaults to GET if not defined. If<br /> it is defined to something besides GET it will use POST. <br /> <br /> Example:<br /> #Here we define a call to twitter:<br /> @webcall(url='http://twitter.com/statuses/friends_timeline.{format=json}', method='GET')<br /> def friends_timeline(): pass<br /> <br /> #returns a a json string for this specific twitter call<br /> friends_timeline(auth_username='bob', auth_password='password')<br /> <br /> #Looking at the twitter documentation we see that this takes in other<br /> #parameters like since, since_id, count, page.<br /> #we will also get the RSS formatted response and limit it to two<br /> friends_timeline(auth_username='bob', auth_password='password', count=2, format='rss')<br /> '''<br /> method = apiargs.get('method','GET')<br /> patter_obj = re.compile("\{[^\}]+\}")<br /> def dec(fn):<br /> def convert_url(url, replace_dict):<br /> for match in patter_obj.finditer(url):<br /> #figure if the key is in the dict if not and there is<br /> #no default value then don't replace and continue on<br /> tmp = match.group()[1:-1]<br /> pair = tmp.split('=')<br /> #if there is a default value and key not in dict use default<br /> if len(pair) > 1 and not replace_dict.has_key(pair[0]):<br /> url = url.replace(match.group(), pair[1])<br /> elif len(pair) > 0 and replace_dict.has_key(pair[0]):<br /> url = url.replace(match.group(), replace_dict[pair[0]])<br /> #this allow for a {key} to only be user once but this could<br /> #be changed in the future<br /> del(replace_dict[pair[0]])<br /> return url<br /> <br /> def new(**kwargs):<br /> '''<br /> auth_username and auth_password are reserved<br /> '''<br /> opener = WebApiOpener(kwargs.get('auth_username',''),<br /> kwargs.get('auth_password',''))<br /> if kwargs.has_key('auth_username'): del(kwargs['auth_username'])<br /> if kwargs.has_key('auth_password'): del(kwargs['auth_password'])<br /> url = convert_url(apiargs['url'], kwargs)<br /> params = urllib.urlencode(kwargs)<br /> if method == 'GET':<br /> stream = opener.open(url + "?" + params)<br /> else:<br /> stream = opener.open(url, params)<br /> response = stream.read()<br /> return response<br /> return new<br /> return dec<br /><br />'''<br />A set of example functions from pownce and twitter<br />'''<br /><br />@webcall(url='http://twitter.com/statuses/public_timeline.{format=json}')<br />def public_timeline(): pass<br /><br />@webcall(url='http://twitter.com/statuses/friends_timeline.{format=json}', method='GET')<br />def friends_timeline(): pass<br /><br />@webcall(url='http://twitter.com/statuses/user_timeline.{format=json}', method='GET')<br />def user_timeline(): pass<br /><br />@webcall(url='http://api.pownce.com/2.0/note_lists/{username}.{format=json}', method='GET')<br />def pownce_note_list(): pass<br /><br />@webcall(url='http://api.pownce.com/2.0/send/link.{format=json}', method='POST')<br />def pownce_send_link(): pass<br /></pre><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-7839124744122206410?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com4tag:blogger.com,1999:blog-3012487414254229946.post-44992044461939122922008-07-26T13:08:00.003-05:002009-05-27T01:32:21.697-05:00google code jam round 1I made it through the qualification into round 1. But in both round 1A and round 1B I did not manage to to be in the top 840 participants in order to move onto round 2. Both times I had the number of points necessary but failed because they do tiebreakers based on time and I just took longer.<br /><br />Here are links to the stats pages: <a href="http://code.google.com/codejam/contest/scoreboard?c=agdjb2RlamFtchALEghjb250ZXN0cxiE2QUM">round 1A</a> and <a href="http://code.google.com/codejam/contest/scoreboard?c=agdjb2RlamFtchALEghjb250ZXN0cxin2QUM&amp;show_type=all&amp;start_pos=961&amp;views_time=1&amp;views_number=1&amp;views_file=0&amp;csrfmiddlewaretoken=">round 1B</a>. I am user: "evanlong."<br /><br />So for round 1A I managed to solve the first problem for both the small and large input sets. So I managed to figure out the simple problem but nothing else. For round 1B figured out the first and second problems. And my solution worked for the small input sets but failed to finish in time for the large input set.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-4499204446193912292?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-27168067900950295732008-07-24T20:53:00.009-05:002008-08-07T17:57:44.891-05:00Building a Geo Location (App|Game)I know this isn't a <a href="http://www.navigadget.com/index.php/2006/04/04/take-down-your-targets-a-gps-phone-tag-game">very</a> original idea but I would like to see it happen on a massive scale. I even remember reading that <a href="http://www.diydrones.com/">Chris Anderson </a>wanted to have a competition of drones racing between different sets of GPS coordinates. So games with GPS are not new but I have not seen many of them come to life.<br /><br />The first step I am going to take is to build an app that allows people to post their location and have it appear on a map that they could then embed in their homepage(pretty similar to <a href="http://loopt.com/">loopt</a>, <a href="http://fireeagle.yahoo.net/">fireeagle</a>, <a href="http://brightkite.com/">brightkite</a>). But I think the really fun part would be to build a game on top of tools like this. Ideally it would have the following features:<br /><ol><li>A commander console would allow one user to command the "troops" in the field. </li><li>Messaging system of some sort between the troops and commander. Probably text messaging ($$$).<br /></li><li>This is probably an obvious feature but a client app on for automatically posting GPS location to the server. The app could also alert them of a nearby enemy if the have that "ability." The host server that was coordinating all of this would have to make sure that users with certain phone numbers could not access certain parts of the site. Feature #5 is a good example.<br /></li><li>Spectator mode</li><li>The goal of the game could be for one team to get from one side of the city to the other without getting tagged.</li><li>Fog of war on the commanders map.<br /></li><li>Real cool feature that I am sure is a few years off: Live video from the users in the field being available to the commander through a service like justin.tv or ustream.tv.</li><li>(insert all other strategy game features here)<br /></li></ol>That's what I would like the game to have. I think it would be pretty fun to play. But also fun to build. Right now I am working on reminding myself of how to use django because I don't really like the webapp framework which came with google app engine. And I also don't want it to be tied tightly to google app engine although I will probably hosting it there at first. So I'll make sure I don't depend on django modules too heavily. As a side note the built in webapp framework that comes with app engine is ok. But I really don't like how you HAVE to configure some of the URL related things is YAML and another part in the python source file. Django just allows you to configure everything in the urls.py. The second thing I find annoying is the fact that if you want to require login it must be done on for the whole python source file. In django you can do it on a per view basis by simply marking it with a decorator. But my complaints are quite minor.<br /><br />Back to the GPS game. I wish US telecoms didn't completely suck. Wifi isn't everywhere. 3G is expensive and <a href="http://en.wikipedia.org/wiki/WiMAX">WiMAX </a>isn't available yet but I have the full confidence in US telecoms to make it suck. But if WiMAX is the next best thing I think this device could be the answer to client software: <a href="http://en.wikipedia.org/wiki/Nokia_N810">N810</a>. It has a camera, GPS, WiMAX, and Wifi. I have the N800 and it is pretty nice. The Maemo OS can be programmed in C but there are also python wrappers which I used but the documentation is poor. The most promising thing I believe is that <a href="http://code.google.com/android/">Google Android</a> can run on it. Android has better documentation and lets you program in Java. But I don't know how well Android will interface with the Camera and GPS on the N810.<br /><br />Until next time.<br /><br />Update:<br />"troops" - could be real people, robots both land and air. Basically anything you can think of that could be controlled via the commander. The integration of all these things would be beyond amazing. Oh well. This should keep me busy for the next few years right?<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-2716806790095029573?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com2tag:blogger.com,1999:blog-3012487414254229946.post-14876749755029012422008-07-24T18:15:00.002-05:002008-07-24T18:29:22.185-05:00The reason I bought this domain...Fits my domain name perfectly:<br /><a href="http://blogs.chron.com/techblog/archives/2008/07/malware_authors_take_aim_at_growing_number_of_1.html"><br />http://blogs.chron.com/techblog/archives/2008/07/malware_authors_take_aim_at_growing_number_of_1.html</a><br /><br />It does not matter how secure your OS is. In the end the user is the one who is responsible for their systems security. And even if they do something stupid the OS manufacturer will be blamed. It shouldn't be long before the penis enlargment ads and hot XXX links come with the DMG file you need to double-click on before you are able to buy their product.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-1487674975502901242?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-67698724950030450872008-07-21T20:15:00.002-05:002008-07-21T21:59:06.821-05:00python treeI implement a simple tree with the DFS and BFS defined using python generators.<br /><br /><div class="mycode">class Tree:<br /> def __init__(self,data):<br /> self.children = []<br /> self.data = data<br /><br /> def dfs(self):<br /> yield self<br /> if len(self.children) == 0:<br /> return<br /> for child in self.children:<br /> for c in child.dfs():<br /> yield c<br /><br /> def bfs(self):<br /> yield self<br /> queue = list(self.children)<br /> while len(queue) > 0:<br /> first = queue[0]<br /> queue = queue[1:]<br /> queue.extend(first.children)<br /> yield first<br /> <br /><br />if __name__ == "__main__":<br /> root = Tree(-1)<br /> root.children = [Tree(i) for i in range(5)]<br /> for i in range(5):<br /> root.children[i].children = [Tree(i*j) for j in range(3)]<br /><br /> #-1,0,0,0,0...<br /> for node in root.dfs():<br /> print node.data<br /><br /> print<br /> print<br /><br /> #-1,0,1,2,3,4,0,0,0,0,1,2,0,2,4...<br /> for node in root.bfs():<br /> print node.data<br /></div><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-6769872495003045087?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-91417048938715588332008-07-17T22:57:00.001-05:002008-07-17T23:00:59.485-05:00made it to the first roundWell my one solution to the first problem was good enough to get me to round 1 of google code jam.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-9141704893871558833?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-40844833347123759752008-07-15T18:07:00.001-05:002008-07-15T18:07:52.857-05:00code jam<a href="http://code.google.com/codejam/">Google Code Jam</a> has their first round tomorrow so I'll probably do a practice round to prep for that.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-4084483334712375975?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0tag:blogger.com,1999:blog-3012487414254229946.post-55582721367814908442008-07-13T00:22:00.006-05:002008-07-13T00:51:47.837-05:00chipmark2rssI have been busy this past week but I got a chance to create a new chipmark feature. It's not actually on your our <a href="https://www.chipmark.com/Main">Chipmark </a>server but I wrote an app on <a href="http://code.google.com/appengine/">Google App Engine</a> that downloads your public bookmarks and puts them in an RSS feed. The app can be downloaded <a href="http://infectmacfiles.googlepages.com/chipmark_rss.zip">here</a>. The downside of the app is that users must provide there username and password. It would be nice if we implemented OAuth on Chipmark so third party apps could be allowed access to the account without the user having to give their password away to the app. One goal this past year was to implement mashups with chipmark. Currently, we do not have a method that allow users to expose their public chipmarks. For right now the app engine app is the only way to embed a feed of your chipmarks in a website. Take a look at the sidebar and you'll see some of my recent chipmarks.<br /><br />I should mention I thought of doing this after seeing this in my feed reader yesterday: <a href="http://torrentfreak.com/automate-your-bittorrent-downloads-with-mininova-bookmarks-080709/">remote torrent</a>.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3012487414254229946-5558272136781490844?l=www.infectmac.com'/></div>Evan Longhttp://www.blogger.com/profile/18429554959963902427noreply@blogger.com0