Category Archives: Uncategorized

Classes, Objects, Methods, and Constructors

As a fan of the TheNewBoston.org website and YouTube channel, I am also a member of the TheNewBoston forums, where there are a bunch of knowledgeable and helpful people when it comes to computers, programming, and technology.

Recently, one of the users of the website posted in the Java section of the forums, asking what the difference was between classes, objects, methods, and constructor methods in Java, which I thought was a pretty good question, and figured I’d write a blog post about it to explain it to those who may not be a member of the TheNewBoston forums.

Since Java is an object-oriented programming language, many programs and applications written in the language are made up of multiple classes, which contain attributes, methods, constructors, etc., all of which work together to make the program run the way the programmer intended.

In a procedural language, like C, Pascal, Fortran, or BASIC, classes don’t really exist, so the idea of objects and object-oriented programming doesn’t apply (though there are some things that are similar to object-oriented programming languages with some procedural languages),  Java and other OOP languages rely on the concept of classes and objects, so it’s important to understand what these things are and how they work.

Classes

In object-oriented languages, like Java and C++, classes are essentially sections of code that are combined into a project to create a program.

Classes are useful, as they help to break up the various sections or pieces of code that may be a part of a larger program, and can be helpful when organizing and diagramming how a program or application should work.

Classes can contain attributes, such as variables and constants, as well methods (similar to functions in other languages, like C, JavaScript, PHP, etc.).

Variables and constants usually hold values (and constants are usually “permanent” values, meaning they can not be changed in the program), which can be used elsewhere in a class, or referenced from another class, via an object of a particular class.

Methods:

Methods, which are contained in classes, are used to perform operations on data, such as mathematical operations like addition, subtraction, multiplication, and division, obtain data from the user or from elsewhere in a program or file, parse data entered by a user, program, or file, and more.

Many classes available in the various Java libraries, such as the Math class, contain a bunch of methods (and attributes, like pi and e), that can be used to perform a variety of different operations or functions.

In the case of the Math class, there are methods, like sqrt()pow()abs(), and a variety of other methods, many of which also take parameters, which are values that are passed into a method, by putting attributes in the parenthesis of a method.

Objects:

Objects are basically different instances of a class, and allow you to access and use the public methods and attributes of the class that has been instantiated, or created, as an object.

For example, in the Scanner class (a class in the java.util.* package), you can use, or “call”, the various methods that are contained within the class, such as the nextInt()nextDouble()nextLine(), and other methods, provided that you have instantiated an object of the class.

When instantiating an object of a class, you usually use the following syntax:

ClassName objectName = new ClassName();

(Note: In the above line of code, the “ClassName()” segment, after the “new” operator, is actually a call to the class’s constructor method, which will be discussed later in this post.)

If you would like to call a method of a class, you can do so by placing the method name after the object name, using the “dot” operator, like in the example below:

objectName.methodName();

Many times, methods will return values, which can be stored in a variable, such as when finding the square root of a number, getting user or file input, etc., which could look something like:

double myDouble = Math.sqrt(27);

In this case, the value of the variable myDouble would be 3, since the square root of 27 is 3.

Constructor Methods:

Since Java is an object-oriented programming language, there are times when an object of a class requires a value upon instantiation, or creation, of an object of that class.

This is where constructor methods come in handy, as they enable objects to be created with initial values, either entered by a user or taken from elsewhere in the program, such as from another class, a return value, an attribute, etc.

Every class in Java contains a constructor method by default, even if one is not explicitly written in the class, regardless of whether or not the class requires one or not. Because of this, the default constructor will execute when an object of the class is instantiated, but won’t change any data or affect how the class or object works.

However, if a class requires a constructor method, a programmer can write one, therefore overriding the class’s default constructor method.

Whenever an object of a class is instantiated, its constructor method can be used to initialize or change the various values and attributes present within the class, which can be useful if a class requires user entered data or information from somewhere else in the program.

Below is a link to an example class that I wrote, called CircleClass, where you can see various parts of a class being used, including attributes, methods, a constructor, etc.

http://pastebin.com/9F32VL0q

Also, here is a link to another class that I wrote, called MainClass, which shows how an object is instantiated and how methods of an object are called, including how the constructor is used to initialize class attributes.

http://pastebin.com/9qwmcnTQ

After I wrote and compiled the code for these two classes, I was able to run the program successfully, and got the correct results (I checked using Google’s calculator functionality), which are below.

Area: 78.53975
Circumference: 31.4159

If you’d like to see my reply to the thread/post referenced in this blog post, you can check it out here, at the TheNewBoston forums.

For updates on future posts or if you’re interested in what I’m up to on a day to day basis, please feel free to follow me on Twitter (@Jamiemcg)! You can also follow TechnicalCafe’s Twitter (@TechnicalCafe) for news and updates regarding the website, YouTube channel, and more!

Skullcandy Hesh 2.0 Headphones

If you’re looking for some new, good quality, headphones that won’t break the bank, perhaps you should check out the Skullcandy Hesh 2.0 headphones.

I found out about these headphones while in my local Target store with my father recently, and after giving them a listening test, using the music samples that were available at the store, I decided to purchase them, as I was unable to find my Apple earbud headphones, that came with my iPhone 5.

At the store, however, there weren’t too many sample audio tracks to listen to, and the two that I did listen to were RAP or hip-hop style songs, so I didn’t to hear how other song types sounded, but did like how the bass sounded when listening to the available tracks.

There were other headphones available to test out, as well, including Beats, by Dr. Dre, though I wasn’t able to get the sample music to play through them (probably some issue with the audio source, connection, etc. and not the headphones themselves.), and did not want to spend too much money on headphones anyway, so I decided to go with the Skullcandy Hesh 2.0s.

Once I got them home and opened them, I tested them out, using my iPhone 4 as the audio source, with a variety of songs that I had on the phone, including rock, dub-step, piano, and other styles and types of music.

As far as sound quality goes, I think these headphones offer great sound quality, with a rich bass and the ability to handle higher treble sounds without any sound issues. They also produce a clear sound, with great quality, that may even rival that of more expensive headphones.

While the Hesh 2.0s do not offer noise-cancelling capabilities, they do have padded earphones, which do a pretty good job of keeping external noises, such as the sound of a TV or people talking, out, leaving you to enjoy your music without too many distractions (at least at a low sound level, anyway).

As for the actual hardware, the headphones themselves are made of plastic, but don’t feel as though they’re cheaply constructed. Also, like mentioned before, they have padded earphones, which offer a decent amount of comfort. (However, at the time of this writing, I haven’t worn them for an extended period of time.)

These headphones also don’t require any batteries or charging, as they’re powered solely by the device that is providing the audio, which adds some convenience, as you don’t have to worry about the need to carry extra batteries with you or having to recharge. However, the downside to this is that they may pull some extra power from your iPod or other device, draining the battery a bit quicker than usual.

Additionally, the Hesh 2.0 headphones come with a detachable 3.5mm cord, which is nice when it comes to storing them or even if you find the need to replace it, should anything happen to it.

Also included is a carrying bag, which doesn’t seem as though it would offer too much protection, but is nice for storing the headphones, and maybe the cord, should you want to put them together.

All in all, for around $60 (at Target, where I purchased them), I think the Skullcandy Hesh 2.0 headphones are a pretty good deal, as they provide great sound quality and offer good comfort when wearing them.

While there may be some higher priced alternatives available, the Skullcandy Hesh 2.0 headphones are definitely a good pair of headphones to consider if you’re on a budget and are looking for a good pair of over-the-ear headphones that offer great sound quality and comfort!

If you would like to check out these headphones, you can do so from Amazon.com, where they are offered (at the time of this posting) at $38.15, which is a 36% savings from the retail price of $59.99.

For updates on future posts or if you’re interested in what I’m up to on a day to day basis, please feel free to follow me on Twitter (@Jamiemcg)! You can also follow TechnicalCafe’s Twitter (@TechnicalCafe) for news and updates regarding the website, YouTube channel, and more!

 

iOS 7

If you’re an iPhone, iPad, or iPod Touch owner, or perhaps an Apple enthusiast, you have probably heard about the newest version of Apple’s iOS operating system, iOS 7, which was revealed yesterday, on the first day of Apple’s WWDC event in San Francisco, California.

While there was no new iPhone announced, it was announced that Apple’s iOS would be getting a pretty significant update, to iOS 7, this Fall and would be available on the iPhone 4, iPhone 4S, iPhone 5 and the newer iPod Touch and iPad models.

Included in this update are a variety of new features including a new design for the user interface (which includes app icons, the app dock, as well as many of the Apple applications themselves), the addition of the “Control Center”, an update to the “Notification Center”, improved multi-tasking capabilities, iTunes Radio, the camera app, Safari, Siri, and other updates, as well.

User Interface & Design:

The user interface and design that we have been used to in previous iterations of iOS, including the current version, iOS 6, will be receiving a pretty significant update, with many of the Apple made applications’ icons and user interfaces getting face-lifts. Included in this list of apps are Notes, Safari, Calendar, Photos, Camera, Weather, Stocks, Compass, and many of the other Apple apps that are included in iOS.

In addition to the icons themselves being updated with new looks, many of the Apple application user interfaces will also be getting new looks, with many of the apps featuring new, simplified UIs.

For example, the Messages application will be updated with a new UI that features new speech bubbles that look “flatter” than the ones in previous versions of iOS. The keyboard section of the app will feature a keyboard that contains combinations of black, white, and grey. These updates provide a “cleaner” and more simplified look to the app, while still looking similar to the previous version of Messages.

Another significant app update is present in the built-in Weather app, which will feature animations detailing the current weather conditions, in a way that is similar to those seen in other, third-party, weather apps available in the App Store. So, if it is raining outside and you launch the Weather app, you will see rain drops falling on your iPhone’s screen, along with other weather information, like the temperature, etc.

Siri will also be receiving an update in iOS 7, which will make it look more simple and will feature a new screen that appears when talking to or asking questions of the application. In addition to asthetics, Siri will also feature a voice update, and users will now be able to choose between a male and female voice.

Control Center:

Another update included in iOS 7 is Control Center, which provides users with quick access to what their phone is doing at the current moment. Accessible by swiping up on the screen at any time, even from the lock screen, users can perform actions, such as set their phone to Airplane Mode, enable or disable Wi-Fi, turn on the “rotate-lock”, adjust screen brightness, and view information regarding music and volume.

The new Control Center will also enable users to quickly access several apps, including the Calculator app, enable the new “Flashlight” feature, use the camera, and use their timer application.

Notification Center:

The Notification Center, which has been around for a while, and can be accessed by swiping down from the top of the screen from almost any application, is also getting some updates in the newest version of iOS.

Among the updates to the Notification Center include the ability to view the weather, your calendar, reminders, missed calls, text messages, and more. Users can also choose whether they would like to see notifications for “Today”, “All”, or “Missed”, which gives them better control over the information they would like to see.

Multitasking:

Multitasking is another feature that has been around for a while that is receiving some updates.

In iOS 7, the operating system learns which applications users like to use, and when, and has the ability to update the app’s content before the user even opens it. This feature may be good for checking applications like the weather, stocks, Facebook, Twitter, and any other app that you check frequently or at a specific time of the day.

Also, like before, pressing the Home button twice will reveal the applications that are currently running on the phone. However, in iOS 7, not only will apps appear in the bottom, dock area, you will also be able to view previews of the applications and if you would like to quit one, all you have to do is swipe up, putting it out of view.

Additionally, iOS 7 will schedule updates to your phone at times that are more convenient for the battery, such as when the phone is plugged in and connected to Wi-Fi.

Other Updates:

In addition to the updates mentioned and explained above, many other features of iOS will be receiving updates, including the camera application, Photos application, Safari, AirDrop, the App Store, Siri, and more.

Also, iOS 7 will feature iTunes Radio, which enables users to stream music and more from “radio stations” available  from within the app, which sounds similar to other third-party applications, like iHeartRadio.

If you would like more information about the updates that will be included in iOS 7, you should check out the iOS 7 page on the Apple website.

Also, if you have any questions, comments, or suggestions related to this blog post or any other matter, please feel free to use the Contact page to send me an e-mail. Alternatively, you can send a Tweet to either @TechnicalCafe or @Jamiemcg!

What is the Difference Between Java and JavaScript?

If you’re a computer user, especially one who uses the Internet on a regular basis, chances are that you have heard of both Java and JavaScript, two programming languages that some people may unintentionally confuse, due to the similarity of their names.

However, these two programming languages are not the same, and are actually used to do different things, though they do share some of the same syntax and other features. They are also both frequently used by programmers, and in fact, you may use them both everyday and not even know it!

Java

Java, though it shares some syntax and other features with JavaScript, is a totally different programming language, and is used for different purposes than one might use JavaScript for. And actually, Java was created first, before JavaScript existed, which may be where the inspiration of the name “JavaScript” came from.

One of the major differences between Java and JavaScript is that Java is a compiled, high-level, multi-purpose programming language, which can be used for a wide variety of different tasks, both online and in a browser and offline and running on a computer’s operating system, independent of whether or not the computer has an Internet connection.

Unlike JavaScript, which can be written and then immediately executed with a user’s browser, after writing Java code, it must first be compiled, or turned into code that can be understood by the computer, or more specifically, the Java Runtime Environment’s, or JRE’s, virtual machine (JVM), since Java code runs with the help of a virtual machine.

Once a programmer writes their Java code (a “.java” file), and the complies it, it turns into a “.class” file that contains the compiled Java bytecode, which can then be read and understood by the Java Virtual Machine. The JVM, in turn, takes the compiled Java bytecode and then runs, or executes, the code, thus causing the computer to do what the programmer originally asked it to do.

Since Java runs with the help of the Java Runtime Environment and its virtual machine, Java code can be run on any device that supports the installation and running of the JRE and JVM, which includes computers, cell phones, routers, cameras, and other devices!

Another difference between Java and JavaScript is that, when writing code in Java, a programmer has to define which datatype they will be using, which includes defining the type of variable that they would like to use, where as in JavaScript, this is not usually the case.

For example, in Java, there are a variety of different datatypes, such as: String, int, float, and double. (There are also others, which can be found by doing a search online.) In JavaScript, the variable type var can contain all of the above datatypes that one has to specifically define in Java, thus making the writing of Java code a bit trickier.

JavaScript

JavaScript is a type of programming language, as its name implies, called a “scripting language”, and is mainly used in web development, as it allows programmers to add more interactivity and functionality to webpages than just HTML and CSS alone. JavaScript is also frequently used with languages like PHP and MySQL, in the form of AJAX or by use of the jQuery library.

To be more specific, JavaScript is considered a “client side scripting language”, which means, unlike languages, such as PHP, which is a “server side scripting language”, it can be used to interact with a user’s web-browser, adding interactivity that otherwise would not be present with just HTML or PHP alone.

For example, when used in conjunction with the jQuery JavaScript library, JavaScript enables users to enter data into a database without having to refresh the page that they are currently on. This helps to reduce the number of page loads, thus making interactions on a website quicker than they would otherwise be.

An example of how data can be entered and retrieved from a database without having to refresh the page would be with Facebook’s chat service. When a user types a message to another user, the data is entered into a database, but is also then retrieved from the database relatively quickly and shown to the receiving user or users whom the message was intended for.

Because of languages like JavaScript, especially in the form of jQuery and AJAX, the user does not have to refresh the page they are on, making the user experience faster and easier for the user.

Additionally, JavaScript can be used on its own to create alert, or pop-up, boxes, which we have all seen while using the Internet. Also, using JavaScript, programmers and web designers can create redirects, so that a user does not have to enter in another URL, should they need to be transferred or directed to another webpage – the JavaScript code will do this for them automatically.

However, programmers can not create full-featured stand-alone programs that can be compiled and run on a computer’s operating system alone, as JavaScript is intended for use within web-browsers and for other, similar, applications — this is where languages like C, C++, and Java can be useful. 

Similarities

In addition to all of the differences between Java and JavaScript, there are also similarities between the two languages (and other programming languages, as well)!

For example, in both Java and JavaScript, much of the syntax is the same, especially when it comes to writing basic code, such as with loops, if/elseif/else statements, methods, and more!

Also, both languages are object oriented, which means that they both support the use of the various features of object oriented programming, such as the creation and instantiation of classes, manipulating objects, encapsulation, polymorphism, as well as some other features.

However, there may be some slight differences between the various things that can be done when related to OOP, since the two languages are different and serve different purposes, but for the most part, the two languages support much of the same features when it comes to writing object oriented code.

If you were someone who was unsure of what the differences between Java and JavaScript were before reading this post, hopefully you are now in the know as to what the differences and similarities are when it comes to writing and using both Java and JavaScript code!

Also, should you have any questions, comments, or suggestions on this post, or any other post or topic, please feel free to contact me!

Facebook Buys Instagram for $1 Billion

As you may have already seen on various social networking websites, Facebook will be acquiring the popular social imaging sharing application, Instagram, for $1 billion.

Today, about two hours ago, Instagram CEO, Kevin Systrom published a blog post, stating that Instagram has agreed to be acquired by Facebook. Also in the blog post, Systrom says that Instagram “is not going away” and that the two companies will be working together to “evolve Instagram and build the network.”

According to the blog post, Instagram will still be the same application that users “know and love”, and everyone will retain their followers and such, as well.

In addition, Facebook CEO, Mark Zuckerberg posted to his Facebook profile’s timeline, saying “I’m excited to share the news that we’ve agreed to acquire Instagram and that their talented team will be joining Facebook.”

Zuckerberg also said in his post that while Facebook and Instagram both compliment each other, “we need to be mindful about keeping and building on Instagram’s strengths and features rather than just trying to integrate everything into Facebook.” He then goes on to say “That’s why we’re committed to building and growing Instagram independently. Millions of people around the world love the Instagram app and the brand associated with it, and our goal is to help spread this app and brand to even more people.”

With Instagram for Android just released about a week ago, on March 27, 2012, I find this to be an interesting announcement. I think it’ll be interesting to see how Instagram can grow and develop now that they have the power and funds of Facebook behind them.

For more information regarding this announcement, you should check out this blog post from Instagram, Mark Zuckerberg’s timeline post, and this article from TechCrunch If you’re interested in what Instagram is all about and what you can do with the application, please feel free to check out this TechnicalCafe blog post that I wrote a while back.

 

Instagram for Android

If you have an account on social networking websites, such as Twitter or Facebook, chances are that you have seen at least one image that has been uploaded and edited using the popular social photo-sharing application, called Instagram.

Instagram is an application that enables users to take photos, or choose existing photos from their iPhones, iPod Touches, or iPads, and then edit them by applying one of a variety of different filters to them. (Feel free to check out this, more in-depth, post about Instagram, here!)

Then, users can enter in some information about the photo, such as some text, describing it and whether or not they would like to geo-tag it, and upload it to the Instagram service. From there, other Instagram users can view, “like”, and comment on these pictures.

This popular application also features the ability for users to share their photos on both Facebook and Twitter, which may have helped other people discover Instagram.

However, Instagram is still only available on iOS enabled devices, such as Apple’s iPhone and other devices, mentioned earlier, leaving users of other smartphone operating systems, such as Android, wondering if Burbn, Inc., the application’s creator, would eventually release a version for the operating system that their phones run.

Now, however, Android users shouldn’t have to wait much longer for a version of Instagram compatible with their cell phones, as there is a relatively new page on the Instagram website, which displays an Android logo that has a camera set into it. Additionally, on the Instagram website’s homepage, there are two download links, one for the iOS version of the application, and one for the Android version, which says “Coming Soon”.

When clicked, this button will take users to the aforementioned page, which is displayed above, where they can enter their e-mail addresses, in order to be “first in line” for the Android version of the application.

Having been an Instagram user on the iPhone, I found the application to be fun to use, and also useful for adding some effects to photos, making them look better, perhaps setting the tone for the photo itself.

However, having recently switched to the AT&T Fusion, which runs Android, I was no longer able to use Instagram, and instead of having the option of posting the original photo to websites, such as Twitter or Facebook, I was now forced to do so, or to find an alternative application.

Though, now that Instagram is coming to the Android operating system, hopefully us Android users will be able to use Instagram again, or perhaps even begin using the application! As for when Instagram will be coming out for Android, the date is unknown, but hopefully it will be sometime in the near future!

If you have a device that runs iOS and would like to try using Instagram, you can download the application for free from this link (may open iTunes if you have it installed on your computer). Also, if you’d like to visit the official Instagram website, you can do so at Instagram.com.

For updates related to TechnicalCafe, please feel free to follow us on Twitter, at Twitter.com/TechnicalCafe! If you’re interested in what I’m up to on a daily basis, you can follow me on Twitter, as well! (@Jamiemcg)

Apple iPad Announcement

As you have probably already heard, yesterday, Apple CEO Tim Cook announced the company’s newest version of the iPad, with some new features, as well as some improvements on some current features, making it perhaps the best version of the iPad yet!

There are still two models of the iPad, one that is Wi-Fi only, and one that incorperates both Wi-Fi and, a new, 4G connection.

Both of these are the same size, with the height measuring 9.50 inches, width being 7.31 inches, and their depth both being 0.37 of an inch. However, the Wi-Fi version is slightly lighter than the Wi-Fi + 4G version, with the Wi-Fi only iPad weighing 1.42 pounds, and the Wi-Fi + 4G version weighing slightly more at 1.46 pounds. Though, this probably isn’t enough to notice any significant difference.

Additionally, both models of the iPad have three options as far as memory goes, with there being 16GB, 32GB, and 64GB models, which was what there were with the previous generation of the iPad.

One thing that people were speculating that the new iPad would have was a Retina screen, which they guessed right, as this version comes with a 9.7 inch LED-Backlit Retina multi-touch display, with a resolution of 2,048 by 1,536 pixels, at 256 pixels per inch (PPI).

The display also features a fingerprint resistant coating, as well, which should help to keep your screen clean, as far as fingerprints go, anyway. Also, the display is able to display multiple characters from multiple languages at the same time.

As for the processor, according to the Apple website, the new iPad comes with a “Dual-core Apple A5X custom-designed, high-performance, low-power system-on-a-chip with quad-core graphics”, which is newer than the Apple A5 chip that is in the previous generation of the iPad.

The iPad has support for Wi-Fi  802.11 versions a, b, g, and n, as well as support for Bluetooth and a 4G connection with AT&T or Verizon being the carriers to choose from.

Additionally, the iPad’s camera has been upgraded to a 5 MegaPixel iSight camera, with features including: autofocus, tap-to-focus, face detection (in still images), 1080p HD video recording, as well as the ability to use Apple’s FaceTime service in VGA quality at 30 fps, with the iPad’s front-facing camera.

As for battery life, the Apple website says that the iPad a built-in 42.5 watt-hour Lithium-polymer battery, which can provide up to 10 hours of battery life for web surfing on Wi-Fi, watching videos, or listening to music. However, if one is using the 4G connection, the iPad’s battery can provide up to 9 hours of battery life, which is only a one hour difference than if one were to use the Wi-Fi connection.

The new iPad will be running Apple’s iOS operating system, which includes the ability for users to download applications, as well as use the ones that come pre-installed on the iPad, some of which include: Apple’s Safari browser, the Mail application, iBooks, Photos, FaceTime, NewsStand, Maps, Messages, Calendar, as well as some others!

One new feature that was not in previous versions of the iPad or iOS is the “Dictation” feature, which enables users to simply talk, and their iPad will type what they are saying. Dictation can be used with built-in applications, such as Notes, as well as third-party applications, which can be quite useful, especially if you have a lot to type, or simply do not feel like typing it in!

Additionally, while reading over some of a TechCrunch article by writer and CrunchFund partner, MG Siegler, he noted that this version of the iPad did not come with a new name, such as the “iPad 3”, which perhaps some people were expecting. Rather, it was simply called the “iPad”, and Siegler points out that this is also the case with the Mac and MacBook line of products, which is interesting.

For more information regarding the newest version of Apple’s iPad, you should check out the iPad section of Apple’s official website, where you can find information about the iPad’s specs, iOS, the built-in applications that the iPad comes with, as well as more information about the iPad’s features!

If you’d like to pre-order a new iPad or purchase any other Apple prodouct, you can do so by visiting the Apple Store website.

SOPA and PIPA Blackouts

As you have probably noticed throughout the day yesterday, a variety of websites went “dark” or “blacked out” in order to protest the proposed SOPA and PIPA laws that are being considered by the United States’ Congress.

If you’re unfamiliar or are unsure of what SOPA (Sop Online Piracy Act) and PIPA (Protect IP Act) are, they are acts or laws that are being considered by the House of Representatives and the Senate of the United States, respectively, which would allow the government to essentially “censor the Internet”, in order to prevent piracy and to protect copyrighted content that can be found online.

This means, for example, that if a social networking website had a lot of users and some of them were posting material or links that contained copywritten material, these websites could potentially be shut down or censored by the government.

However, many web companies and services decided that this should not be something that happens, and because of this, chose to protest the SOPA and PIPA bills by “blacking out”, or essentially “going offline” on January 18, 2012, for a day.

One company that decided to “black out” their website in protest of these two acts included Wikipedia, which displayed a large banner over the content of articles, preventing users from reading them, but letting them know what these acts are, why they can be considered bad for the Internet and its users, as well as what users can do to help protest and prevent these acts from becoming law, which included providing contact information for various state legislators.

Reddit.com, a popular news sharing website, also “blacked out” their website for a majority of the day, and like Wikipedia, informed users of what these proposed pieces of legislation are and what would happen if they were to come into effect in the United States. Additionally, Reddit also provided users with information about protesting and contacting law-makers.

Many other companies and websites also participated in the “black out” day, including Google, WordPress.org and Quora. Though, not all of these companies decided to shut down completely, and especially in the case of Google, would probably not have proved logical, as it is such as large company with many people depending on its services.

However, Google did “black out” their logo, covering most of it with a black box and linking to this page, which provided information about the proposed anti-piracy acts and how to go about protesting and preventing them.

For images of what some websites looked like when they “blacked out”, you should check out this thread on the Helifreak.com forums, which I found while searching for SOPA images on Google Images.

Quora.com, like many other websites, chose to display a banner at the top of their website, which said “Stop SOPA” and linked to a question on the website about what the company’s stance on SOPA and PIPA is.

The AmericanCensorship.org website has created a great infographic, which describes what SOPA is, what the effects of this bill can have on the Internet, as well as what you can do to help prevent this bill from becoming law.

Additionally, FightfortheFuture.org has created a video, explaining what PIPA is and what effects the bill will have on the Internet and its users, should it end up coming into law.

As you can see, SOPA and PIPA are bills which much of the Internet community is strongly against and is protesting. For more more information about these proposed acts, as well as how you can contact a legislator in your state, you should visit the above websites, which provide great information regarding this topic.

What is Binary?

If you’ve been using computers for a while or have seen the Matrix movies, you have probably seen, or at least heard of something called “binary”, which consists of a variety of 0s and 1s, arranged in seemingly random patterns.

However, did you ever stop to think what those 0s and 1s mean and how they are arranged?

In order to understand what the binary number system is all about, it is a good idea to have an understanding of the number system that we use all the time in everyday life – the decimal, or base 10, number system.

In the decimal number system, we can represent things, such as the number of people in a room, the time, how many apps you have on your phone, as well as a whole array of other things. All of the quantities that were just mentioned are probably written using the numbers 0-9. Including 0, there are 10 numbers in the decimal number system, which is why it is called “base 10”.

These numbers can be arranged in any order to form other, larger or smaller numbers, depending on which “place”, or position, a particular number is in. For example, if you have the number 123, there are three places, the one’s place, ten’s place, and hundred’s place.

If we wanted to, we could represent 123 by raising 10 to the power of the position a particular number is in, starting at 0 and going from right to left and then multiplying that figure by whatever number is in the position.

For our “123” example, we can represent 123 as:

3*100 + 2*101 + 1*102

When these numbers are added and then combined, we will arrive at the original number of 123.

(3*1) + (2*10) + (1*100)

= 3 + 20 + 100

= 123

The same is true of the binary, or base 2, number system. However, unlike the decimal number system, there are only 2 numbers which are used in the binary number system, which, as you probably guessed, are 0 and 1.

In binary, rather than having each “place” or position raise in value by powers of 10, they raise in value by powers of 2.

If we have, for example, the number 1010, in binary, which, in order to prevent readers, as well as people converting from one base to another, from getting confused, we can represent by putting the value in parenthesis and adding a “2” subscript, simply to represent the fact that the number is in base 2 and not base 10 or decimal, or even some other base, we can figure out what it is equal to in decimal notation, by performing the same process as we did earlier.

(1010)2 = (x)10

(1010)2 = 0 * 20 + 1 * 21 + 0 * 22 + 1 * 23

= (0*1) + (1*2) + (0 * 4) + (1 * 8 )

= 0 + 2 + 0 + 8

= (10) 10

So, 1010 in binary is equal to 10 in decimal, or base 10, notation. Because of the fact that this conversion happens to only involve the numbers 0 and 1, the parenthesis help to prevent confusion between which base is which, as 10 in decimal can be converted to 2 in binary.

Now that we’ve learned a bit about the binary number system, what does this have to do with computers or technology?

Well, at the most basic level, computers do not understand letters, numbers, symbols, or even pictures as the symbols or colors that users see when typing or viewing them. Computers see these things as strings of 0s and 1s, which, to the processor or CPU, means “on” or “off”.

Also at the basic level, programming languages, such as C, C++, or Java, which are intended to make things easier for programmers, rather than having to input large strings of 0s and 1s, are complied into a language which the computer can understand, which is sometimes referred to as “machine code”.

Eventually, this code is read by the computer’s processor, or CPU, as a binary file, and the computer then follows the instructions in a language that it, rather than users or programmers, can understand.

So, the next time you see a movie or come across something that involves binary, hopefully now, you’ll be able to understand a little more about how things are converted to binary, as well as what binary notation is actually used for, in terms of computers and technology.

If you’d like to learn more about compilers and what they do and are used for, as well as other topics, you should check out CodeHelp.co.uk, which is where I got some of the information regarding compilers and what they do, included in this post.

Also, if you have a computer related question that you are curious about, or perhaps just a tech support question, please feel free to send me an e-mail, using the “Contact” page! You can also follow TechnicalCafe on Twitter (@TechnicalCafe), as well as me (@Jamiemcg), if you’re interested in what I’m up on on a day-to-day basis.

Black Friday Tech Deals 2011

Since today is Black Friday and many companies and retailers, both online and off, are offering discounts on lots of products that can be found in-store and online, I figured I would compile a list of some technology related deals and product discounts that I found on various websites, such as Amazon.com and the websites for individual retailers, such as Best Buy, etc.

Amazon.com Technology Deals

Kindle DX – $259.00

The Kindle DX is one of the “older” members of Amazon’s Kindle family of e-book readers, in that it was first announced in May of 2009. However, this does not mean that the Kindle DX is behind the other versions of the popular e-book reader. The Kindle DX received an update in July of 2010, which was known as the Kindle DX “Graphite”, and was the third-generation of the Kindle DX.

Some of the features of the Kindle DX include a 9.7 inch (diagonal) e-ink screen, which works well when reading in sunlight, as it reduces glare, as well as having a thickness of only 1/3 of an inch, which, according to the Amazon website, is as thin as most magazines are. In addition, the Kindle DX features a free 3G wireless connection, a 1 week battery life (with wireless enabled) or a 2 – 3 week battery life, provided you have disabled the wireless connection.

Also, the Amazon Kindle DX has a memory that can hold 3,500 books, magazines, documents, etc., as well as a built in PDF reader, among other features, which you can find on the Amazon Kindle DX webpage.

Original Price: $379.00

Deal Price: $259.00

Savings: $120.00

Cannon PowerShot SX230HS 12 MP Digital Camera – $199.99

The Cannon PowerShot SX230HS digital camera is another great deal that is being offered on Amazon.com.

If you’re looking for a new camera or are looking for a gift to give to someone who loves to take photos and videos, perhaps you should consider this product.

Some features of the Cannon PowerShot SX230HS camera include Cannon’s HD System, with a 12.1 megapixel resolution, the ability to record 1080p HD videos with stereo audio, a GPS tracker and logger, so you can remember where you took your photos, a 14x optical zoom with an optical image stabilizer, as well as a 4x digital zoom, and a 28mm wide-angle lens.

This camera also features a “Smart AUTO” mode, which can be used to have the camera automatically select the proper settings for your camera to use, based on a library of 32 predefined shooting situations.

For more information on the Cannon PowerShot SX230HS digital camera, as well as for user reviews, etc., you can check out the product’s information page on Amazon.com.

Original Price: $349.00

Deal Price: $199.99

Savings: $149.01

Walmart.com Technology Deals

Samsung 32 Inch LCD HDTV – $278.00

The Samsung LN32D403 HD television is one of the deals that is being offered on the Walmart.com website as a part of their Black Friday specials, in addition to a variety of other products, including more TVs, etc.

Some features of the Samsung LN32D403 HDTV include a 32 inch class size screen (or a 31.5 inch screen, when measured diagonally from corner to corner). This Samsung TV has a 16:9 aspect ratio LCD display, which has a resolution of 1366 x 768 pixels.

Also, this television features a built-in digital tuner, so you can watch your favorite TV shows and such, without having to purchase an external analog-to-digital converter box. The Samsung LN32D403 HDTV also has a 20,000 : 1 contrast ratio, as well as a “wide color enhancer”, which, according to Walmart’s website “provides natural and realistic color”.

In addition, this TV features “ConnectShare JPEG”, which enables users to plug a USB flash drive, MP3 player, or other USB device into their TV and view pictures, videos, as well as listen to music, right on the TV without the need to install any additional hardware or software.

There are two HDMI inputs on this television, as well, so users can input things, such as video games, DVD  or BluRay players, etc., and view the content in high definition.

For more information on the Samsung LN32D403 32 inch HDTV, including additional hardware specifications and such, you should check out the product’s page on the Walmart website.

Price: $278.00

Sony Speaker Dock for iPhone and iPod Touch  – $49.00

Another deal being offered on Walmart.com is for a Sony Speaker Dock for the iPod Touch and iPhone.

Some of the features of this product include a dual-alarm, as well as an easy to set “A-B alarm”, as well as the option to set alarms for 2, 5, or 7 days. Also, this Sony Speaker Dock enables users to set the brightness of the LCD display.

Additionally, this Sony Speaker Dock has “Mega Bass” and “Mega Xpand” sound features and comes with a remote control, an AC cord and adapter, an audio-in cable, an AM loop antenna, so users can listen to music and content, in addition to what they have on their iPod Touch or iPhone, as well as a universal dock adapter for the iPhone and a universal dock adapter for the iPhone 3G.

If you’d like more information about the Sony Speaker Dock for the iPhone and iPod Touch, you should check out the product description page on the Walmart website.

Original Price: $99.99

Deal Price: $49.00

Savings: $50.99

Sandisk 4GB and 8GB Flashdrives – $5.00 and $9.00

While this isn’t a “big” product in terms of expenses or savings, as well as physical size, I thought it was worth mentioning that Walmart.com also has a deal on these two Sandisk flashdrives, which may come in handy if you’re someone who happens to be looking for a deal on them or are some who simply likes to have a couple of extra storage devices hanging around.

The 4GB Sandisk flashdrive is being offered for $5.00 and the 8GB Sandisk flashdrive is available for $9.00, which I thought was a pretty good deal!

However, I’m not sure what the color choices are for these flashdrives, as the pages that linked to for these two products offer the 4GB version in navy blue and the 8GB version in red. (I don’t know if they have other colors available on the website or not, but it may be worth a look if you have a preference.)

Other Deals

As you can imagine, there are also a variety of other deals being offered online, through many different retailers and websites, including deals from Apple, BestBuy Staples, OverStock.com, as well as other online retailers and websites.

Also, many of the discounted items that are available online may also be available in-store, depending on which retailer you are looking at. If you’d rather pick up an item in-store, in order to avoid the costs and wait associated with shipping an item that you purchased online, it may be a good idea to call the store you plan on going to beforehand and ask if they have the item you are looking for in stock, so as to avoid making a trip for nothing.

Have you found any Black Friday deals online that you thought were good or would like to share? If so, please feel free to post a comment below!