Pong Game in Python
by Asdquefty on Oct.25, 2009, under Grab Bag
I’ve written a clone of Pong in Python and pyGame, and it’s pretty much debugged and ready to go. It may not play exactly like the original game, and the movement speeds of the paddles and ball are not yet optimized, but it’s playable. The movement speeds are set in two constants near the top of the programs, note that lower is faster. If it helps, think in terms of less latency and not more speed.
The program is provided as source, and you need to install Python 2.6 and pyGame for this to work. I have not tested running it with Python 3, and it probably won’t work with 3.
pyGame Animation Example
by Asdquefty on Sep.13, 2009, under Computer Science, Linux, Software
I did up an animation to teach myself the basics of drawing images to the screen in pyGame, it’s pretty simple, just an ambulance with flashing lights.
The source code provided is an example of how to initialize pyGame, how to prepare the screen, load images using a relative filename, and draw the images to the screen in sequence.
To run this program, you need Python 2.6.2 and pyGame 1.9.1 installed and working. I have not verified that this code runs on Python 3.
The Linux command for installing pygame is usually one of the following:
sudo apt-get install pygame (Debian, Ubuntu, Mint)
su -c “yum install pygame” (Fedora, Red Hat)
sudo zypper install pygame (SUSE)
su -c “pacman -Sy python pygame” (Arch)
(Seriously, Fedora, just install sudo by default already. Geez.)
EDIT 09/15/2009: pyGame is not in the Ubuntu repository, contrary to what is stated on the pyGame website.
Please follow the instructions at http://www.pygame.org/wiki/CompileUbuntu for Ubuntu.
Figuring Tips For The Math-Impaired
by Asdquefty on Aug.24, 2009, under Grab Bag
Whenever I go to a restaurant, the standard is to give a 15% tip. Can you figure out 15% of 15.93 without a calculator? Not likely when you’re at the point to pay at a restaurant.
An easier way to figure the tip is simple: 1 dollar on every 5 dollars of the bill. If it seems a little low, add a few quarters to be sure.
Supportive Relationships Are Essential For Everyone On The Autism Spectrum
by Asdquefty on Aug.23, 2009, under Grab Bag
As many of my readers and friends know, I have Asperger’s Syndrome. If you didn’t know, now you do. You may have heard of it, you may have not heard of it, it’s a condition that the public considers a mild for of autism, and that clinicians consider a specific set of the the people on the autism who can speak.
However, the point of this post is not to get into discussion about how the autism spectrum is defined, the point is to outline how all of us on the autism spectrum are people underneath the label, or sometimes pile of labels, applied to us.
We feel. We hurt. We lust. We get lonesome. We worry. We cry. We laugh. We love.
The thing is, we can’t always show it, communicate it, or sometimes even recognise it.
It’s important for everyone on the spectrum to have supportive relationships whether it’s family, friends, work, or even online. It’s even more important that we get the chance to have more then one. Parents don’t always understand, and quite a few make little effort to figure out how their child feels. Friends are not always available. Sometimes it’s better to not tell an employer about an ASD or other psychological diagnosis. Online friends can’t offer a good hug or buy you a drink to sit and talk it out over.
I don’t always mean a supportive relationship to be one where you talk it out. I’ve found being in university and working in what I love doing to be very supportive and good for my mental health. In the mental heath arena, they often talk of a work-life balance. We’re getting the life part down for people on the spectrum with groups like GRASP, ANI, ASAN, and websites like Wrong Planet, Aspies For Freedom, and Twitter, we really need to work on getting the work part down.
We need to equip people on the spectrum better for the working world, figure out what might help people on the spectrum in the workplace, and educate employers on how to work around the problems in ASDs and more importantly showcase what autistic people are good at doing. Specialisterne is proving people on the autism spectrum are good at testing software. I personally love testing software, it’s the fun part. Other jobs good for people on the spectrum can include engineering, cleaning, building things, inspecting things, computer programming, and computer repair. It depends upon the skill level.
The USPS is about to change for the worse, not the better
by Asdquefty on Jul.22, 2009, under Grab Bag
I came across this post by naamah_darling on LiveJournal. Please read and repost, so that they do not destroy the USPS as we do nothing.
Do you like your mail service? DO SOMETHING. (continue reading…)
Shiny New Domain for Forum! W00t
by Asdquefty on Jul.13, 2009, under Grab Bag
I checked with my webhost, and found that because of an unused offer I was eligible for a domain for $4.95, so I bought one for the forum to distinguish it from this blog a bit more.
The new link is http://autismdiscussion.net
I didn’t break the old link this time, w00t.
I get to have the OOOH shiney…. for a day or two.
Meow
Apparently Stamps Have Stories…
by Asdquefty on Jul.02, 2009, under Grab Bag
I was at the post office this morning to ship an eBay sale, and bought some stamps for mailing to the US.
There’s a character on the stamps, “Miga”, and a story on the back which reads:
Miga is a young sea bear who lives in the ocean with her family pod, out past Vancouver Island near Tofino, British Columbia. Sea bears are part killer whale and part bear. Miga is part Kermode Bear, a rare white bear that only lives in British Columbia.
It’s followed by a French translation of the story. Apparently “Miga” is a mascot for the Vancouver Olympics next year.
http://www.vancouver2010.com/mascot/en/profile_m.php
Seriously, Canada Post, I think you need to share that weed with the rest of us.
Moved the forum
by Asdquefty on Jul.01, 2009, under Grab Bag
I have moved the forum from autismtreatment.asdquefty.com to autismdiscussion.asdquefty.com, as I will be reworking it to be meant for general discussion about autism.
Human Versus Python: Execution speed of max value code.
by Asdquefty on Jul.01, 2009, under Computer Science, Linux, Software, Technology
As most of you know, I am working at my university for the summer to help with research in mathematics. I am working on comparing the quality of meshes and their solutions. (If my supervisor sees this, correct me if I’m wrong in describing what I’m doing.) I am blogging about my work because I feel it’s an open process and people should know what goes on with research, it’s all in the public domain anyway.
Anyway, we recently have been working on some code to figure out which triangle in a given mesh a point belongs to, and if it belongs to none, then whichever one it’s closest to. At one point in the file, my supervisor wrote the following code for finding the maximum of the 6 numbers in three coordinates: (I would probably write similar.)
biggestSoFar = x0
if(x1 > biggestSoFar): biggestSoFar = x1
if(x2 > biggestSoFar): biggestSoFar = x2
if(y0 > biggestSoFar): biggestSoFar = y0
if(y1 > biggestSoFar): biggestSoFar = y1
if(y2 > biggestSoFar): biggestSoFar = y2
I decided to compare it with the running time of Python’s built-in max() function:
biggestSoFar = max(x0, x1, x2, y0, y1, y2) (continue reading...)
Rescued Computer
by Asdquefty on Jun.29, 2009, under Grab Bag
I found two ThinkPad A31 laptops in the trash at work today, and brought both home, in the home of building a working machine between them and a broken A30p I have.
I have managed to make one usable laptop from the parts I have with the following specs. (It’s staying in my family, already been claimed, lol)
1.6GHz Pentium 4M
48GB HDD
Radeon 7500 gpu
512MB RAM
DVD-ROM/CD-RW combo drive
Ports: 2USB, parallel, serial, VGA, Ethernet, modem.
I will be looking to see how much RAM is in the two broken machines and hopefully bring the working machine up to 1GB.