Using the Tinyurl API
May 5th, 2009Lately I’ve had a need to use the Tinyurl.com API. The API has been usefull for a couple of things since I started using it.
Shortening URL’s
This is obviously the intended purpose of the Tinyurl API. With a very simple function you can shorten urls very easily. This function passes the url to the Tinyurl API which shrinks it and then it is pulled back using file_get_contents()
function shrinkUrl($url){
$url = file_get_contents('http://tinyurl.com/api-create.php?url='.$url);
return $url;
}
$tinyurl = shrinkUrl('http://www.ninnypants.com');// equal to http://tinyurl.com/6lbwc4
Generating a Random Key
The Tinyurl API can also be used to generate a random key specific to the information you pass in. As long as you don’t pass in a url Tinyurl will only return the the code at the end of the url (6lbwc4) The service now attaches the the first part of the url to the code also so the random key function takes a little more code.
function randomKey($url){
$key = file_get_contents('http://tinyurl.com/api-create.php?url='.$url);
$key = str_replace('http://tinyurl.com/', '', $key);
return $key;
}
New Formatting for XMLHttpRequest
March 30th, 2009Recently I decided to try reducing the size of hacking the HTTP request for cross browser support in AJAX. This little snippet has been tested and is working.
// new xml http object
var xmlHttp = new XMLHttpRequest() ? new XMLHttpRequest() :
( new ActiveXObject("Msxml2.XMLHTTP") ? new ActiveXObject("Msxml2.XMLHTTP") :
( new ActiveXObject("Microsoft.XMLHTTP") ? new ActiveXObject("Microsoft.XMLHTTP") : null ) );
I find this new method easier to read and is much more elegant than the method bellow; which is the only method I’ve seen out there.
try{
// Firefox, Opera 8.0+, Safari
xml=new XMLHttpRequest();
}catch(e){
// Internet Explorer
try{
xml=new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
xml=new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){
alert("Your browser does not support AJAX!");
return false;
}
}
}
I know that I am not the only who has tried to shorten this section of code. Let me know what you think or how you handle it yourself.
Why I Dislike Microsoft Programs
February 18th, 2009Today I got the project of fixing a file that was displaying only gibberish for students to read. When the file was pulled down to the desktop it had a nice little Microsoft Word symbol on it, so I though I would share what microsoft word can do to a nice elegant piece of html. This is just 27 lines of 1389
ÿþ< h t m l x m l n s : v = ” u r n : s c h e m a s – m i c r o s o f t – c o m : v m l ”
x m l n s : o = ” u r n : s c h e m a s – m i c r o s o f t – c o m : o f f i c e : o f f i c e ”
x m l n s : w = ” u r n : s c h e m a s – m i c r o s o f t – c o m : o f f i c e : w o r d ”
x m l n s : m = ” h t t p : / / s c h e m a s . m i c r o s o f t . c o m / o f f i c e / 2 0 0 4 / 1 2 / o m m l ”
x m l n s = ” h t t p : / / w w w . w 3 . o r g / T R / R E C – h t m l 4 0 ” >
< h e a d >
< m e t a h t t p – e q u i v = C o n t e n t – T y p e c o n t e n t = ” t e x t / h t m l ; c h a r s e t = u n i c o d e ” >
< m e t a n a m e = P r o g I d c o n t e n t = W o r d . D o c u m e n t >
< m e t a n a m e = G e n e r a t o r c o n t e n t = ” M i c r o s o f t W o r d 1 2 ” >
< m e t a n a m e = O r i g i n a t o r c o n t e n t = ” M i c r o s o f t W o r d 1 2 ” >
< l i n k r e l = F i l e – L i s t h r e f = ” i n s t r u c t o r _ f i l e s / f i l e l i s t . x m l ” >
< l i n k r e l = E d i t – T i m e – D a t a h r e f = ” i n s t r u c t o r _ f i l e s / e d i t d a t a . m s o ” >
< ! – - [ i f ! m s o ] >
Locks of Love
January 31st, 2009Yesterday I completed one of my life goals of donating my hair to Locks of Love. A charity which takes donations of hair and make wigs for financially disadvantaged children with long-term medical hair loss. I certainly got plenty of surprised comments/looks afterwards and I greatly dislike the haircut. This is all easier to think about when I think of the fact that an underprivileged cancer victim is profiting from my small loss it makes me feel much better about it.


Survey for People Who Make Websites
July 29th, 2008
Today I took the Survey for People Who Make Websites, and if you build web sites you should to. We should all thank the people at A List Apart for providing this service, and for taking steps toward building metrics for our industry.
The Cheatability Factor
June 11th, 2008The Cheatability Factor at TTIX08 was one of my favorite sessions of the entire conference.
The first part of this Session was a video that covered what cheating is and why students cheat. The first part also covered ways to cheat and how to cheat. These were covered in the video through comedic shorts similar to those on Conan Obrian. The back channel was the most used I think of any of the Sessions of the conference, but I had to leave as soon as the discussion started.
Part two was highly iteresting. The discussion turned to why students cheat. Most students cheat because of unnecessary load created by the professor. Professors are not the only producers of load. Students also create plenty of load for themselves by slacking, and not keeping deadlines. I know that I’m guilty of this. I doubt that any of the attendees had any of the major cheating risks in their courses. From my experience teachers who were there were either technologists themselves, or they actually cared about their online courses. The classes that would have most of the trouble with cheatability would probably be classes with teachers who think that they do not need to be involved in their online courses. The details are starting to fade from my memory so I’ll stop here…
TTIX – Social Software
June 6th, 2008The Early Bird Workshop at TTIX 2008 discussed many points that I hadn’t expected. While I went in expecting a discussion on using Social Software in education, it was more of a teaching workshop. The workshop covered technologies that Instructors can use to link up and share Ideas. this workshop covered the use of Social Softwares such as Twitter, Flicker, and del.icio.us. The back channel was rather quiet with only one person that does not work for UVU participating.
I walked away from this session not really having learned more, but having more of a realization that many people have never used these tools, or even knowing that they exist.
Acceptable academic use of social media
April 20th, 2008Last week John Krutsch asked me “do you think there is ever an ok way for teachers to use social media in classes or for course work without being creepy?”. My answer was yes if they are used in the right way, and that is what I would like to elaborate on.
The thing I find about integrating classroom tools into social media, is that for me to truly accept it the tool needs to serve a purpose. If the tool is just a calender that is inserted into the normal interface of a social device like Facebook or Myspace what is the point? what purpose does it serve? Student’s will still have to go to their course web site to truly do anything of importance, so in my opinion the app is just adding to the noise. I feel that the use of networks like Facebook, Myspace, and Twitter should not be used in classes. (the one exception are classes on society or social behavior.) The use of these networks invades student’s private lives which they may want to keep separate from their school work.
While I find social devices mentioned above to not be acceptable there are platforms that are acceptable. Blogs for instance are a great source of information that are often used in a social way. The use of these for academics is highly acceptable because they can be used for the purpose of study or a way to get feedback from classmates. While blogs can be very effective they like other forms of social media need to be implemented correctly. The use of these types of media while less invasive can still feel very invasive to college students. That is why the way they are implemented is very important. Just requiring the use of blogs in your class can cause a creepy tree house effect, and may meet rejection from your students. I believe that if you explain the use of the blogs in class it will most likely have a much better effect. Also offering an alternative to blogging in your class may also accent this effect. While the use of social media in the classroom is acceptable you need to implement it correctly to achieve the desired effect.
Students should build their own tree house.
April 7th, 2008A big issue in the Ed Tech world is the idea of the proverbial Creepy Tree House. A Creepy Tree House is what a professor can create by requiring his students to interact with him on a medium other than the class room tools. Examples of this would be requiring students to follow him/her on peer networking sites such as Twitter or Face book. ( for a better definition of a Creepy Tree House see John Krutsch’s blog post “Are You Building a Creepy Tree House?” ) Although I find Creepy Tree Houses to be one of the worst things in Education Technology; this is not to say that students following their professors on these types of applications. I personally follow two of my professors, and I believe this has only helped to build my enthusiasm for the class and for continuing my studies. This scenario may sound like the Creepy Tree House that I have just claimed to have feelings of disdain, but it is a different form of interaction. I sought out these individuals of my own accord, and was in no way directed to do so. I find that I enjoy the interaction, and it has provided me with a great amount of information that I can apply to my chosen profession.
As a student I would most likely run from any online class in which I was required to network with the professor outside of the class, or to use tool like Black Board Sync. I personally feel these tools too fully integrate class into the students’ everyday life. Yes this is what they are meant for, but I find that as a student I like to have a break from my studies. I do try to fully integrate myself with the class and participate as much as possible, but I find that situations like these remind me of the annoying kid in class. We’ve all had that experience; there is the one kid in class that bugs the heck out of the rest of the class. You know the kid the one who seems to talk just to make noise or interjects into a conversation in which he is not welcome. You rejected that student then, so why would it be any different with these new apps and possibilities in teaching?
Students reject Creepy Tree Houses for one reason they are creepy. I think a better approach to education is the idea of a Personal Learning Environment (PLE). This allows a student to build their own tree house, which they can invite the professor into when they feel comfortable doing so. This allows students to shut class off when they need to and turn it on when it is time. This method does not mean that the position of the teacher is in any way disintegrated. It has the opposite it allows the teacher to take on their true roll of mentor. Teachers in this system will move to the position of a mentor because they will be moved into the background and will just provide support through needed interaction (materials, demonstrations, Q/A). This allows student to learn how to truly learn by letting them build their own tree house into which they can incorporate anything.








Older Entries