Thursday, December 23, 2010

Share your programming knowledge; don't retain it

A while back, I sought some information about writing emulators. I thought up a general idea of how an emulator would work just to get my brain thinking in that mode. Once I had a plan, I searched the web for forums, articles, and people to correspond with about emulators. (After all, part of the whole programmer/hacker ethic is not reinventing the wheel.)
Finally, I had found a forum. Good and bad came from that. The good was that the forum and discussion confirmed my general plan (I was happy that I had thought of emulating systems the same way that others do); the bad was that some user completely disregarded the let's-not-reinvent-the-wheel idea. Basically, he or she wrote that anyone that has to look up how to write an emulator is not smart enough - and will never be able to - write an emulator.
This bothered me for a multitude of reasons:
  1. His or her statement meant that he believed in reinventing the wheel. After all, if you cannot ask for help, you are your only resources and must, as a result, reinvent the wheel.
  2. He or she clearly either do not know how to write one themselves - otherwise, they would have at least posted something more helpful - or they are just ignorant, or both.
Quite frankly, I believe that information about programming should be spread. I do not mean just give away code for people to copy; I mean prompt them, have them learn on their own, but help them as soon as they hit a bump. There truly is no point to postpone their acquisition of knowledge. Think of postponing that acquisition as slowing down the general advancement of tech knowledge.

On a final - and unrelated - note: if anyone is interested in writing an emulator with me, comment and we could possibly set up some repository for the code. Nevertheless, I'll finish up my emulator, regardless of whether I have any takers.

Share.

Proxy Server

General Information:
Essentially, a proxy server is a server that connects a computer to another server. They are usually used to get access to a blocked website server.

Let me explain - as the previous definition can be confusing without an example. To open a web page, a computer must connect to a server. (Think of a server as another computer that stores a website in a file; picture the file as an object.) With that said, when you want to load a website, the computer you are using connects to that website server and downloads the file. Now, in a school - or work - setting, the administrators (the people that control the computer system) can block access to a server; and thus, block access to a webpage file.

To bypass that, someone can connect to a proxy server, which is NOT blocked, as long as the administrators do not know about it. This server can ask the computer what site the computer wants to connect to. Then, the proxy server can download the appropriate website server's web page data/file and send it back to the computer that could not previously access it.

Basically, the proxy server downloads the webpage file from the blocked server and saves the webpage file on the proxy server so that any computer can access it. That way, your computer can get the same webpage that they wanted to get from the blocked website, without ever actually connecting to that site's server.
As you can see, someone can access a blocked website through a proxy server.

Mind you that proxy servers can be blocked by administrators - they aren't impervious - because once the server is used, the administrators can block it.

Real life example:
Let me, now, give you a real life example. Say I am at school and want to go to "http://www.yahoo.com".
Now, let's pretend my school blocks "http://www.yahoo.com". What I would do is go to the webpage of a proxy server - just like I would with any other website. I would type in the "http://www.yahoo.com". The proxy server would go to "http://www.yahoo.com", download the webpage, and send it back to me. Now, I have the "http://www.yahoo.com" webpage, which was blocked; and I didn't have to actually visit "http://www.yahoo.com".

Simplified definition:
In sum, a proxy server duplicates the website that you want by copying the websites files; and then, it sends the files back to the user.

--------------

Extra:
Of course, in real life, proxy servers are more complex: they have to write an interface for the user; they have to interact with other servers; and, they have to adjust links and functions in the page so all interactions are directed through the proxy server (trying to direct links and functions through the blocked website would not work, because the blocked website is blocked). However, the above examples, etc, should be enough to give someone a general understanding of proxy servers.


Here I just want to write some of the extra considerations and specifics of running a proxy server.
It seems that the programmer of the proxy server would have to adjust all of the links on the webpage. Such functionality can be achieved by simply removing the domain name of the original, blocked website from the links, which tells the browser to apply all links to the end of the current - proxy - domain name. Mind you that advanced websites won't include the domain name in their website, because it is implied that the domain name that the website's links apply to should be the active website, unless explicitly specified otherwise.
Also, the proxy server would have to crawl the website to download all of the necessary files. This would only be hard if the website's robot file prevented crawling, and, as a result, prevent finding and downloading the necessary files.

UPDATES:
This article may or may not be updated in the future. If I decide to make my own proxy server for experience purposes, I will most likely provide an update that will include my experiences, lessons I've learned, etc.

Thursday, November 25, 2010

Multi-tasking In 4.0: Clever

Apple claims that iOS 4's multitasking is "[m]ultitasking done the right way." And to be quite frank, I couldn't agree more; Apple's implementation is multitasking done the right way - for mobile devices at least. Essentially, Apple's implementation gives the programmer sufficient access to allow programmers to implement multitasking functionality throughout his or her program - without draining as much battery as a traditional multitasking system.

The multitasking now built in to iOS offers 7 services: background audio, Voice over IP (VoIP), background location, push notifications, local notifications, fast app switching, and task completion. Those 7 services pretty much solve all previous multitasking problems. With each service addition, the roadblock that prevented thousands of applications from providing the ultimate user experience is being suspended higher and higher.

  1. The background audio now allows applications like Pandora to play music, while the user works with different applications. (Notice the plural; because, now the user can do more than one thing.)
  2. Voice over IP now allows phone calls over the internet. Applications like Skype can now utilize this so that users can make phone calls outside of the Phone app, while multitasking.
  3. The background location service means that an iOS device's location can be found without using a lot of GPS data. It is cleverly implemented as well. The phone gives the application an updated location, when the device switches between networks. As a result, the phone does not drain as much battery as a flat-out, frequently-updating GPS system does. (This follows the same philosophy of push notifications: use a signal that has to be used regardless, the phone network connection, to help perform other services.)
  4. Push notifications were already offered, but now the services have expanded to offer the following service: local notifications.
  5. Local notifications allow applications to generate their own alerts. The usefulness in this is best found in timers and task completion alerts. When a timer is finished or items have finished uploading, the application can alert the user.
  6. Task completion was also added. The task completion service allows an iOS application to complete whatever process it was doing even after the user has left that app. Then, when the task is complete, the phone won't continue to allocate resources that won't be used to the application. Such a feature will be useful for applications like the flickr app that previously required the application to be in the foreground for picture uploads to be completed.
  7. Lastly, fast app switching is more of a UI interface adjustment; however, it is just as crucial. The fast app switching interface is basically the bar on the bottom of the screen that springs up when the home button is double-clicked. Swipe to the left and you have audio controls and orientation lock; swipe to the right and you have access to your previously opened applications. This is useful, because now a user can copy information from Safari, switch to the Mail app - without having to click the home button, search for the application, and repeat - and paste.
All of these services are necessary and extremely useful. They all perform the tasks that are crucial to the usability of many applications without draining as much battery or slowing down the device as traditional multitasking does. The phone retains the functionality of a multitasking device without draining resources.

What may seem like limitations to others, is really just the same efficient innovation that Apple has supplied for years. It is Apple's redefinition of multitasking. (Sometimes in technology, it is better to redefine or make a new service that does the job of an old one than to tweak an old one.) This is their take on multitasking. They got the job done, and, in a way that no other company could have. Apple has done multitasking the right way.

Tuesday, November 23, 2010

iOS 4.2 Release

Hello!

On Monday, November 22, 2010, Apple released the 401-megabyte iOS 4.2 update. This update contains security updates, simple tweaks, and more wireless integration (AirPrint and AirPlay.) All of the updates are effectively making the iOS devices less mobile; they are slowly bridging the gap between computers and mobile devices - and may even usurp small computers' dominance in word processing and the like.

In regard to security updates, the iOS has followed a general theme: removal of arbitrary code execution vulnerabilities. (Such vulnerabilities are found in parts of the iOS system that are crucial to the operation of the most basic components.) Essentially, Apple fixed the faulty code [of the programs that receive input and produce output] to block attackers from taking over a phone whose user is simply viewing a picture. Apple accomplished this by correcting vulnerabilities in CoreGraphics, FreeType and WebKit. Since all of the aforementioned pieces of software are components of the web browser (although they are not limited to that use) the user will now be more protected on the web, when dealing with images (CoreGraphics) and plain old - javascript or non-javascript inclusive - HTML pages (WebKit and FreeType.)
(Click here for a description of WebKit, FreeType, and CoreGraphics)

Apple added some nice features that revolve around wireless interaction of devices, giving the user more control. Put simply, the the addition of AirPlay and AirPrint makes the user's iOS device more interactive with other devices. The AirPlay technology allows users to stream music throughout their entire house, assuming they have other devices such as an iMac or an AppleTV. For example, you can stream music directly from your iPod/iPhone/iPad to an AppleTV or other AirPlay-enabled devices. The Printing technology is pretty self-explanatory. Essentially, now you can print files from Mail, Safari, and Photos. (NOTE: Only some printers are automatically AirPrint-enabled; click http://www.lisanet.de/?p=71 for instructions on how to enable AirPrint for almost any printer connected to your Mac. You can type the URL into Google translate if you don't speak German.)

As for some simple tweaks, Apple changed around some icons (Voice Memos), allowed for different fonts in "Notes," and added a search-in-web-page function to Safari, amongst other things. The productivity just keeps on increasing at a rate, at which the adoption rate is not overwhelming.

The iPad update also received some long-awaited updates: Folders and Multi-tasking. Now apps can be grouped together into folders that can contain 12 applications each. The folder's are automatically named based on the category of the applications within it; however, the name can always be modified. The iPad has also received multi-tasking, allowing multiple applications to run at the same time. (Since the multitasking is implemented differently to cope with limited resources, please read my article in order to better understanding it's implementation.) The gap is bridging as productivity increases and limitations decrease.

Added to all iOS devices were keyboard and dictionary enhancements, as well as keyboards, languages, and more-advanced dictionaries. Better input equates to higher productivity for all devices.

In sum, the iOS 4.2 update furthers the transformation of the previous iOS devices into a device with capabilities closer to those of a desktop. The security updates protects your data (suitable for business world); AirPlay and Printing improves interaction among devices (suitable for students who have to complete assignments); the keyboard tweaks improve input on the devices (more efficient input for all); the iPad updates eradicate many of the iPad users biggest qualms; and, the Safari update makes finding and working with data easier (everyone). It is very possible that sometime in the near future, more people will be integrating their iOS devices into their lives and homes as they use it to write reports, take notes, research, and receive entertainment.

Tuesday, August 17, 2010

Disable Geo-tagging On The IPhone

1.Open the Settings application on your iPhone.

2.Scroll down until you see the “General” settings option and select it




3.Scroll down to the “Location Services” option and select it




4.Find the Camera option in the table and toggle the switcher - the on and off switch next to its associated application - to “OFF”.




Friday, August 13, 2010

ooVoo: Unfreeze Video Feed

1. Go to the top left of the video window

2. Press the Video Resolution drop down/button

a. Select a new resolution

3. After the new resolution refreshes the video feed you can change your resolution again to whatever you had it as before


NOTE: A very high resolution trying to work with low bandwidth could be the reason the video feed froze in the first place

Tuesday, August 10, 2010

Readability on MobileSafari

1. Go to: "http://lab.arc90.com/experiments/readability/"

2. Then, bookmark that page (in MobileSafari) and rename it to "Readability".

3. Now, at the link you just visited in step 1, you should see a box with text that looks like code in it. Copy that by using the iPhone's copying function.
This is the code you will be copying:
"javascript:(function(){readConvertLinksToFootnotes=false;readStyle='style-newspaper';readSize='size-medium';readMargin='margin-wide';_readability_script=document.createElement('script');_readability_script.type='text/javascript';_readability_script.src='http://lab.arc90.com/experiments/readability/js/readability.js?x='+(Math.random());document.documentElement.appendChild(_readability_script);_readability_css=document.createElement('link');_readability_css.rel='stylesheet';_readability_css.href='http://lab.arc90.com/experiments/readability/css/readability.css';_readability_css.type='text/css';_readability_css.media='all';document.documentElement.appendChild(_readability_css);_readability_print_css=document.createElement('link');_readability_print_css.rel='stylesheet';_readability_print_css.href='http://lab.arc90.com/experiments/readability/css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_print_css);})();"

4. Visit the bookmark that you just named readability, and click edit at the bottom of the screen. Arrows should appear to the right of all the bookmarks that are displayed on the screen. Click the "Readability" bookmark.

5. In the second field - the one below the name field that displays the name Readability - paste the code that you just copied.

6. Click done.

7. Visit any article. When you want to view it using Readability, just click the readability bookmark.

Thank you for reading! I hope this helps!

Search This Blog