Wednesday, 26 October 2011

News or Not News. Read all about it!

REC at ATBC notes how difficult it can be to tell the difference between what a ID supporter writes and a "shaney". Which supports the main idea behind this site, it's all drivel!

Pop Quiz (no cheating)
O'Leary or IDiot generator, edited for brevity. 

Quote

All kinds of strange stuff has happened since then, including stuff we complain about the Darwin fairy tale of highly creative gene duplication, and it’s too bad if some freak out about the Darwinsludge – the stupid stuff in defense of Darwinism. Which probably does far more harm to their cause than any of us are offended by the constant Darwin worship of the waste basket –

Quote

Are Darwin’s American tribe having a collective nutout or what? Joshua Rosenea went on to quote Virgil’s Aeneid that rumors of the kind I am spreading are “nimble as quicksilver among evils. OK, whatever. Please, lawyer, for all our coffee money for next week: Does Rosenau have a case if we link? Can he force us to break winter camp? This is about some film about dinosaurs in heaven, which nobody can afford to buy and isn’t on line. Dinos aren’t in heaven? We ain’t either. Difference is, we is askin’



Exactly so! While I was writing/debugging I made many searches of the strings that the shaney was coming out with back into UD because I was sure that they were written like that originally and the program was somehow not working and just spitting out the input. But no, every single time the sentence was not there.

I've actually got very little idea of how the shaney is generated in the first place, I've just pasted in a chunk of source code I eventually found. I know it's based on Markov chanins but I can barely understand my own code after a week never mind this:
for word in words:
      if prev1 != '' and prev2 != '':
        key = (prev2, prev1)
        if dict.has_key(key):
          dict[key].append(word)
        else:
          dict[key] = [word]
          if prev1[-1:] == '.':
            end_sentence.append(key)
I know what all the bits do individually but has a whole, not figured much out just yet. But the nice thing about programming is you don't have to reinvent the wheel. Somebody else probably already wrote what it is that you are trying to do and it's out there to include in your work. I knew of the shaney, I just had to hope the source was out there and it was. I'll reproduce it in full shortly. 

Python - How brilliant is that!

I recommend going to http://learnpythonthehardway.org/ and just doing it. If not, just read the last chapter of the book, it's all available online for free. The last chapter gives advice from an old programmer, quote follows:

Programming as an intellectual activity is the only art form that allows you to create interactive art. You can create projects that other people can play with, and you can talk to them indirectly. No other art form is quite this interactive. Movies flow to the audience in one direction. Paintings do not move. Code goes both ways.
Programming as a profession is only moderately interesting. It can be a good job, but you could make about the same money and be happier running a fast food joint. You're much better off using code as your secret weapon in another profession.
People who can code in the world of technology companies are a dime a dozen and get no respect. People who can code in biology, medicine, government, sociology, physics, history, and mathematics are respected and can do amazing things to advance those disciplines.

 So, coding can be a secret weapon at work. Ever watched someone struggle to twist and warp Excel into doing something nobody would ever really want to do in Excel in the first place? Ever get a sinking feeling when another complex Excel boots up and fails to work, something not found some cell not right?

Python is designed to manipluate data at a very high level. Want to sort a list? Easy. Want to make a list? Easier. Having programmed only in C++ before it's a revelation to have it all "done for you" instead of having to create it all (standard library, what's that?) by hand.

Google, again, provide some great resources. Honestly, just watch this video and you'll know Python. Really! Or at least enough to have a taste for what it can do.


You can code. They cannot. That is pretty damn cool.

Google App Engine - The core component.

When I initially started to look at the various technologies available to make database driven websites I thought I'd be learning Apache (for serving the data), Tomcat (for running the application), some database type (probably MySQL due to the price) and some sort of web design tool.

But then I discovered this book!

It essentially shows you how you can avoid all the pain and learning curve associated with Apache, Tomcat and database design and usage. So rather then learning mutiple packages I could just do everything in Google app engine. The book is based around Python and Java and the Java components are the more advanced but it's still a invaluable reference.

If you want to get started with Cloud programming but have very little programming knowledge (but are willing to learn) this is the book for you. More advanced users may find little to interest them but then those users are presumably not reading this blog anyway!

The current SDK for Google App Engine and Python can be found here: Link While you can program Python with a text editor you'll eventually get to the point where that is insufficient. I use Pycharm as a development environment. There is a 30 day free trial available.

The main advantage of using something like Pycharm is that you'll get to the point where you need to debug and to do that you'll need to step through the code one line at a time and I don't believe you can even do that without such an editor.

The editor also allows you to step through the code when you are integrated with app engine itself and it's really invaluable at debugging subtle issues that you simply can't catch by looking at the code (well, I can't!). So now you have a development environment (Pycharm) and a place to develop in (Google App Engine - GAE).

While there is a small cost for Pycharm after the 30 day period it's well worth it. There are alternatives however but for a beginner like me there is not much to choose from between them.

Tuesday, 25 October 2011

Building it. Adobe Muse, Python, Google App Engine. Adobe Muse and Google App Engine

The website (in my mind it's a program) is built on google app engine. I think GAE is fantastic and best of all it has a free option. How that free option will stand up to any traffic I get is something I'll find out. Probably not well! To help limit that the "shaneys" are saved to the datastore and re-used 50% of the time a user asks for a new one. Eventually there will just be a massive database of them and I guess a random one can be selected, although because of the way GAE works that is apparently a whole other problem.
GAE now supports Python 2.7 but I've used 2.5 as that was all that GAE supported around 2 months ago when I started this. As I did not know Python before I doubt I would care about the differences at my skill level.
The website itself was designed in Adobe Muse. It's in a free beta at the moment moving to subscription next year and I think I'll probably sign up. Why not. Sure, it's ideal for them but it's so little money if you are actually earning money from it somehow. And I've never bothered with website design before, more then the very basics needed to display information. You might think I've not moved far beyond that and really, it's true! But Muse turned out to be a very quick (if fiddly, you'll see what I mean) way to get something on the screen other then bare text or a graph and a way to navigate round different screens plus the ability to trigger actions via URLs.
:)
So, it's all free. For now, anyway. Go download google app engine for Python SDK, Python 2.5.2 or 2.7 and Adobe Muse! And I'll explain how you can build you own *insert your pet cause here*iotgenerator with free tools. And if you know *anything* much about HTML you won't even need muse!



Sunday, 23 October 2011

Introduction to the IDiot quote generator.

Wikipedia introduces what I've come to call a "shaney" like so:
Mark V Shaney is a fake Usenet user whose postings were generated by using Markov chain techniques. The name is a play on the words "Markov chain". Many readers were fooled into thinking that the quirky, sometimes uncannily topical posts were written by a real person.


And it reminded me of something - Intelligent Design. You know how sometimes there are not two sides to an argument, there is just one side that refuses to learn. Not every argument has two sides that are equal in the quality of the arguments they are able to present in support of their case.

When people believe things for reasons other then rational ones the "arguments" they produce to support those beliefs can become quite, well, strange. To say the least.

For example:
Knowing monkeys, are they really able to type in any order.? Is it factored in that they would eat the paper every other keypunch? They are monkeys. Do they space? Does a non space series of letters count as words? Something wrong with the monkey thing and literature from thinking people. how many monkeys , how long, would take to reproduce a President Obama speech /! they should pick a short one and calculate it up. I was banned on this Jason Rosenhouse blog because I dared to question..well never mind! If a math Prof thinks they have a good understanding of biological origins and creationist criticisms of that and so on then being specialist doesn’t matter. The only thing math can do in all this is about probabilities of bugs to buffalos. ID’s Berlinsky surely contributes on this and settles the unlikely probability of evolution happening from a math view.


That is quite an extreme example (he's a YEC, somebody who believes the earth is 6000 years old) but it's very much a continuum. His "argument" seems to be that because you cannot easily generate a speech by Obama randomly that evolution never happened. Or something. It's hard to tell.

Another example:

The proteins were not derived via natural selection. The sequences the proteins were derived from were artificial- scientists made them. Darwinism has proven to be a fruitless heuristic. Heck one can teach biology withjout referencing Darwin who really didn’t know anything about the topic- not at the level we do now. But anyway the way “evolution” is being taught EVERY child will be left behind- untestable bunkum


Darwinism has proven to be a fruitless heuristic to Joseph, the author of that comment. I suspect either he's wrong or, well, no, he's just wrong.

So, can their arguments be arranged into a "shaney" and still make as much sense really as in their original form?

Judge for yourself. There is a site called Uncommondescent.com where they pretend to take Intelligent Design seriously. In fact nobody can agree on what ID is, could be or can tell us about anything. So they step around each other in a fantastical dance/charade as they realize that their opinions on what ID is all cannot be true. So they disagree with people who actually know what they are talking about but not with each other, never with each other. The "big tent" and all that. You can't throw a YEC out of the tent no matter how crazy he talk as Darwinists are the true enemy! And it's all a big con to sell books to the credulous anyway.

Here is a shaney made up of random comments from Uncommon Descent.

This is a minimal self replicator (one that cannot be any simpler) Function is defined as the bible says, filled with child burning deviants with a selection list of nutrients” is reasonably called a “nutrient registry” in an increasing level of detail are you saying that Lipid bilayers already exist if it can then that is being used to support it is souls existed pre-Jesus. It’s not that I said … What I should have said was “I’m not going to debate the issue raised by . When he/she/it said … … that goes well outside of my area of expertise. I don’t actually think about it in a global conspiracy. Thats the whole point – how much a particular trait contributes to reproductive success, not just arguments from incredulity either). And while we’re on the natural origin of the system that I can only comment on the topic in question. - Please prove that hybridisation is not taken seriously by the pores of type P1? It is your own behavior KF. A little charity and humility would go a long hard look at the membrane itself have a physical arrangement of matter that function as a harmonious, intricate, coordinated composition of “hardware” and “software” elements. The plain existence of intelligent design in nature. On the other 129 bits right? By a random search as opposed to a particular evolutionary development.


When I read "filled with child burning deviants" I laughed out loud. And knew I had to make this blog and publish the site. And amazingly it's not actually a random construction!

Wow.

So this blog is about how I did that and how I poked one in the eye for the IDiots who promote Intelligent Design.

The site is made up of several sections. It's important to remember that the application has only been running a few weeks however so the totals etc are only accurate from then.

TopPosters: Just a list of the top 15, bottom 15 and overall posters, by post count. You can click on the bars in the bar chart to make a wordcloud.

TopNameChecks: As ID is not about religion you'd expect "god" not to be mentioned much. Or "designer" to be mentioned more. Is that the case? Judge for yourself. I also have a chart for the "L" word.

CustomSearch: Enter your own word here and see who has used it and how many times. Single words only. Click on the bars in the bar chart to see the word you searched for in context (a Kiwc).

QuoteGenerator: Generates a shaney from every posters comment history.

IDiotGenerator: Click on a name to make a shaney from their and only their comments. Funny how it still makes sense, on average.

One interesting example on the custom search page is what happens if you search for "FSCI". It's apparently a foundational concept in ID but it seems that only one person is really using it. How many others can you find?

Enjoy! Data starts around 25/09/2011. Comments from posters that are moderated are not (yet) included.

http://forth998877.appspot.com/PseudoGen_Web_Page