9 Apr
2010

Apple iPhone OS v4 Multi-Tasking with a side of Anti-trust

... sorry you didn't say the magic wordSo I was reading all the hype about the new iPhone OS (Which is ironically called Mac OS X as well… which is confusing), and I was mildly excited about it. I do not own my iPhone anymore, but I liked it when I had it. Of course I suggest everyone who owns a locked down phone like the iPhones and phones using WinMo, to switch over to an android device (or find a way to install android to your phone), but we do not all have this option.

I do want to bring your attention to the latest addition to their developer terms and conditions:

3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).

Now, I am not about to get myself sued for libel in saying “Apple is now engaging in anti-trust” but… this is specifically designed to stop companies developing programs to make coding apple apps easier (in particular to block Adobe from making a flash to app converter), and stopping competition. I would hope that Apple is asked to stop this.

1 Apr
2010

Promoting the USPP

image

Working as an officer for the USPP, is probably one of my favorite accomplishments. Knowing that I am working to make the US a better place. Two weeks ago I was in Portland Maine to help work with the designer of the new site. Today I am meeing with the head of PPWA.

Each area is so unique in how people deal with influences, and its always fun to learn more about each culture.

15 Feb
2010

Write a basic Python IRC Bot

So lets get started, the basics are very simple there are several ways to write an IRC bot in Python, but this one is pretty good. If you want to go more advanced I would suggest looking into twistedmatrix.com Twisted.

First you make a file called ircBot.py, or whatever you want to call it.
We have to put the she-bang line, which you should include in all your code.
#!/usr/bin/env python
Now we have to import the modules necessary for the program.
import […]

There are several ways to write an IRC bot in Python, but this one is pretty good.

First you make a file called ircBot.py, or whatever you want to call it.

We have to put the she-bang line, which you should include in all your code.

#!/usr/bin/env python

Now we have to import the modules necessary for the program.

import sys
import socket
import string

Now we have to define some variables that we will use in the code.

First is the IRC network to connect to, in our case it is Freenode.
HOST=”irc.freenode.net”

Now the port for Freenode…
PORT=6667

Here just put the nick you want the bot to have, for me it is nzkBot.
NICK=”nzkBot”

Same thing as above…
IDENT=”nzkBot”

Here is the “real name” the bot will assume when whois’d.
REALNAME=”nzksBot”

And finally, the channel. Keep in mind that this bot is not auth’d, so it wont be able to go into many channels. I just made my own.
CHAN=”#nzkbot”

This is to make sure everything works fine.
readbuffer=””

Now thats done. On to the fun stuff! All the variables are defined, so this doesn’t need much editing.
s=socket.socket( )
s.connect((HOST, PORT))
s.send(”NICK %s\r\n” % NICK)
s.send(”USER %s %s bla :%s\r\n” % (IDENT, HOST, REALNAME))
s.send(”JOIN :%s\r\n” % CHAN)

But here, you can enter the message you want the bot to say. If you want to add more messages, just make more lines as you see here.
s.send(”PRIVMSG %s :%s\r\n” % (CHAN, “What poppin? The popcorn in my kettle, y’all”))
s.send(”PRIVMSG %s :%s\r\n” % (CHAN, “Right?”))

That will be on 2 separate lines.

And finally, the boring part.

while 1:
readbuffer=readbuffer+s.recv(1024)
temp=string.split(readbuffer, “\n”)
readbuffer=temp.pop( )

for line in temp:
line=string.rstrip(line)
line=string.split(line)

if(line[0]==”PING”):
s.send(”PONG %s\r\n” % line[1])

Doesn’t need much explanation. Just makes sure everything is fine and the IRC server can see the bot, hence the PING PONG.

Now, simply run the program and a bot will come into the channel you specified and say something!

Thats all there is to it, good luck!

Heres is the full source code:

#!/usr/bin/env python

import sys
import socket
import string

HOST="irc.freenode.net"
PORT=6667
NICK="asdf"
IDENT="asdf"
REALNAME="asdf"
CHAN="#asdf"
readbuffer=""

s=socket.socket( )
s.connect((HOST, PORT))
s.send("NICK %s\r\n" % NICK)
s.send("USER %s %s bla :%s\r\n" % (IDENT, HOST, REALNAME))
s.send("JOIN :%s\r\n" % CHAN)
s.send("PRIVMSG %s :%s\r\n" % (CHAN, "Hello There!"))
s.send("PRIVMSG %s :%s\r\n" % (CHAN, "I am a bot"))

while 1:
readbuffer=readbuffer+s.recv(1024)
temp=string.split(readbuffer, "\n")
readbuffer=temp.pop( )

for line in temp:
line=string.rstrip(line)
line=string.split(line)

if(line[0]=="PING"):
s.send("PONG %s\r\n" % line[1])

10 Feb
2010

Who Benefits From Intellectual Property Laws?

Honestly in the debate between the two bloggers (there is another contestant as well over at Matthews blog as well, that he references), they get down to a battle of who Intellectual Property laws were designed to benefit. One claims that Intellectual Property laws are there to aide the consumer, and was developed so that a media can eventually be released for free; and the other says that its designed to aide the artist, and allow them to grow and be able to make a profit off their work.

I fail to see how either of these points are valid or good at all. We have two extremes trying to fight for why they are right and the other is wrong and unfortunately copyright and patent laws are not that black and white… So lets look at this from a real persons point of view.

The current failed copyright system gives a copyright to its owner for their entire life plus 70 years. Clearly this is not for the benefit of the artist, because the artist will not be able to make any gains off those additional 70 years. Thats why the system is flawed, instead of allowing defunct artists music to be put into the public domain so that more people can learn, grow, and build off of it… the current system discourages respecting the late artist by not allowing there to be education based off their work. These laws are, however, in place for the artist.

Matthew also claims that because of the length of this copyright term that art should be released for free, and I feel that it was more of a creative way of twisting words and facts to gather more supporters for your cause (which is admittedly a noble one). We cannot expect artists to release music and not get paid for them, thats why I suggest copyrights, but on a much smaller scale. An artist has the right to make money, and recoup losses from the production of music. However, after a few years the artist’s primary income focuses on live tours and merchandise anyway.

I feel that the reason that drug patents are so short is because the Government realizes that we need short patents to drive innovation. While they would rather neglect artistic innovation, and only embrace being the worlds health care leader. As this shows, not only do short patent times not “kill innovation” as some say it will, but it also drives innovation and can be contributed into the United States great contributions to science.

We cannot be battling any more on black and white issues, and the time is to rally in support of real copyright and patent reform so that we can learn from our medical innovations, and apply that great system to media, and code as well. By allowing people to build off code after 7 years opposed to the rest of your lifetime… we develop better projects. By allowing music to be mixed, we create more innovation in what music is and what it can be.

Whats funny is that the answer to the question is simple:
Who does (current) Intellectual Property Laws help? Management
Who does (current) Intellectual Property Laws hurt? Anyone who wants to learn.

9 Feb
2010

Keep Your Change, I Want Progress…

I am Travis McCrea -

American

Geek

Pirate

I am one man among many

I don’t want change,

I don’t want hope,

I don’t want the government to hold my hand.

I want progress

Progress I can see

Progress that affects my daily life.

My voice is quiet

Our voice is loud

Your not apathetic. You care. You understand that the path that the United States is on is detrimental to the development of our country. We slowly give up our rights day by day, little by little and they seem so small that we don’t think much about them, but today is the day that we need to fight to regain those rights and to put America back on a course where not only will we be the world leader in innovation again, we will be more free than we ever have been, our freedoms, our liberty, and the justice that has been robbed from us, will all be handed back to us on a silver platter if we demand it, and I say we should.

This is not election season, but that does not change the process of democracy, it does not change the fact that this is a country FOR the people BY the people, and when people stand up for what they believe in, and they state their demands they will be answered.

The Digital Millennium Copyright Act of 1998 made it illegal to make backups of media YOU ALREADY OWN. Tens of thousands of people in the Untied States have since been labeled thieves, taken to court, legally pressured, and in some cases lost their job because they were doing the most American thing you can possibly do: Share Ideas.

Thats not right is it?

The First Amendment is crumbling at our feet, politicians see our bill of rights as a punch line, not a foundation. There are reporters who are being arrested for simply being in areas that the news is. However, current Government stands by and watches as Big Media gains control of 80% of the market, allowing them to effectively decide what they feel the news will be .

Thats not right is it?

People draw up a plan for an invention, then decide to never actually create the device… so they get the patent and then shelve it, never again revisiting it… until another person comes up with that idea, builds a device, and tries to market it… then the original inventor sues for infringing his patent. This is the type of practices that kills the innovation in America, granting patents to people is great, it protects peoples work, but don’t you think that patents should be protecting inventions that are actually being produced?

Peaceful assembly is another right given to us by our great First Amendment, however, any peaceful demonstration in most areas needs a PERMIT? Police and Burrocrats should not have the ability to interfere with non-violent non-disruptive protesting. Don’t you feel that you should have the right to speak out against what you feel is wrong prohibited?

Copyright abuse runs rampate throughout the world, has unreasonable term lengths, and is used to prevent, rather than promote innovation. The right to use should never be in question. Currently a person owns a copyright on their work for their entire life after applying for it, then an additional 70 years AFTER THEY DIE. How does that promote innovation?

Finally we should have the right to privacy, and not be seen as doing something wrong because we want it. Digital privacy should be given the same amount of attention as physical, and I know you don’t want someone reading your mail, let alone your email.

This is why the time is now, the time is today.

We need to start calling our friends, posting to message boards, and becoming active… because we don’t have time to wait until the next election… Your voice is that of millions, stand up and represent them.

Follow Me!

Follow Me! Follow Me! Follow Me! Follow Me!

Gimme Support

Give Me A Call!

What’s Being Said

Latest Books

I gave this book a 5 on average it received a 3.55
I, Robot by Cory Doctorow
I gave this book a 5 on average it received a 3.82
Overclocked: Stories of the Future Present by Cory Doctorow
I gave this book a 5 on average it received a 4.03
Little Brother by Cory Doctorow
I gave this book a 5 on average it received a 3.63
Crazies to the Left of Me, Wimps to the Right: How One Side Lost Its Mind and the Other Lost Its Nerve by Bernard Goldberg

RSS Recent Takedown Notices

RSS Boing Boing Blog