Monday, October 10, 2011

Who Needs Javascript?


There is a fact that a large number of people disable Javascript. Why? Well, search for the keywords: Javascript Hijacking. 'Nuff said. Well, Google just announced Dart, a new programming language for the web.

In Dart, you can do classes. You can throw error messages. You can do things like make a class implement Comparable. There are HashMaps, Iterators, and StringBuffers. Yes, it's very much like Java. The syntax is very simple, so it should be easy for people to pick up.

For dart code, you embed it in an HTML tag, much like with JavaScript.

<script type='application/dart'>

Here is the mandatory hello world style code that every language has to do for whatever reason.

<html>
<body>
<script type='application/dart'>
void main() {
HTMLElement element = document.getElementById('message');
element.innerHTML = 'Hello from Dart';
}
</script>
<div id='message'></div>
</body>
</html>

This looks for the element (id) called 'message' and puts the string
'Hello from Dart' between the two tags.

You could also import a dart file, like you can import Javascript or php.

<html>
<body>
<script type='application/dart'>
#source(Hello.dart)
void main() {
hello('Hello from Dart');
}
</script>
<div id='message'></div>
</body>
</html>

For more details, see http://www.dartlang.org/

More on Moore


In all likelihood, everyone is familiar with Moore's Law, even if they don't
know it by that name. The number of transistors that can be placed
inexpensively on an integrated circuit doubles approximately every two years.
Technically, originally it was calculated as "every year" and then refined to
"every two years". The "every 18 months" prediction was actually due to David House, an Intel executive, who predicted that period for a doubling in chip performance. The law is named after Intel co-founder Gordon E. Moore, who described the trend in his 1965 paper which noted the number of components in integrated circuits had doubled every year from the invention of the integrated circuit in 1958 until 1965. He predicted that the trend would continue "for at least tem years".

So, there's a new spin on Moore's Law. In the last edition of the IEEE's Annals of the History of Computing , there is a paper by researcher Jon Koomey that found that there is a rough equivalent to Moore's Law when it comes to energy and computers. In his abstract titled "Implications of Historical Trends in the Electrical Efficiency of Computing" (IEEE Annals of the History of Computing Volume 33, Number 3, July-September 2011), he stated "The electrical efficiency of computation has doubled roughly every year and a half for more than six decades."

Looking as far back as the 1940s, the research found that over time, computers did more work per energy input, with the number of computations per kilowatt-hour doubling about every year and a half. Koomey thinks this trend opens various possibilities. Sensors on a bridge could monitor the structure for potential damage and alert transportation officials when maintenance could be required. Lighting sensors could provide just the right amount of light needed based on occupation levels and daylight levels.

It's worth noting that even with the increase of computing efficiency over time, the total amount of energy used by computers is on the rise. For example, electricity use from data centers grew 36% in the US from 2005 to 2010. Still, with cell phones becoming more and more power hungry (running more apps, doing more things instead of just calls and texting) this news bodes well for cell phone technology and may carry over to electric cars. Time will tell. We'll just have to wait and see if there is Moore energy efficiency advancement in the future.

Saturday, October 8, 2011

Keystroke logger hits networks used by pilots who control U.S. Air Force drones

This was reported yesterday in Wired Magazine and I stumbled on it from a website called Ology.com.  Apparently Ology is not short for technology since they don't know what a key logger is.  Technically a keystroke logger stores every keystroke made .  Ology.com thinks that a key logger locks out the keyboard and they are freaking out and saying that you could do things like redirect the drone.  Granted, a virus may possibly be able to do this, however by definition this description is not a key logger.  A key logger is supposed to be stealthy and try to stay hidden in the background.  It's purpose is to try to obtain and transmit information as stealthily as possible.  The keystrokes could then be sent somewhere, even in real time.  So, you can say, predict where the drone was going and avoid it or intercept it. In all likelihood, it would probably store a batch of data and then somehow transmit it somewhere.  "How can you hide transmission?" you ask?

Well, let's say when data is transmitted, there are errors.  Technically this is the case in the real world on networking and when this happens data is transmitted again.  Now, let's backtrack a bit.  Data is made up of bytes which is made up of bits.  8 bits make up a byte and typically computers use 256 bytes for characters (A is ascii code 65 or 41 in hex).  You could set one of the bits of a byte every now and then.  So, let's say I set the first bit of 8 bytes to something.  Then a program looks at those 8 bits and translates it into a byte.  In other words, you would see this (O=original bit and H=hacked transmitted bit):
OOOOOOOH OOOOOOOH OOOOOOOH OOOOOOOH OOOOOOOH OOOOOOOH OOOOOOOH OOOOOOOH

Okay, yeah yeah, it looks like a song.  But still, 8 bits of 64 are bits I set.  I take those H bits and translate it to mean something.  Now, we stream a ton of data in a second, so maybe every now and then I do this for 128 bytes, sending 128 bits that gets translated to 25 characters of text.  So, I have some data that means something to me.  What happens with the program that is actually sending the data?  Well, to the receiver, it looks like something got garbled in the transmission and so the program resends the data.  So, I could get the retransmission and compare the first send with the second.  Why would I care?  Well, I don't know when my process is sending a message and when it is not.  So, if I check two sets of data and if over 87% of the bytes match, it's probably a resend.  So, then I look at the bits I care about and try to figure out if it translates to a message.  If it does, I have my stealth message that was sent by my key logger.

Now, what makes this key logger especially troublesome is they wipe it out and it comes back!  So, this could be in a bootup rom location or maybe there are a bunch of other programs that recreate the key logger if it can't find it.  So, they have to complete wipe out the hard drive.  So, they had to use BCWipe, a military grade way to completely and utterly delete a file.  (yes, when you "delete" something on the computer, it's not REALLY deleted ... the computer just forgets its there and puts the blocks back into group of the free to use spaces of your hard drive).

In any case, here's the original Wired article.
http://www.wired.com/dangerroom/2011/10/virus-hits-drone-fleet/

Here's the Ology article.  Bear in mind that these guys have absolutely NO clue what the heck a key logger is.  And I have no clue what robotic Rockem Sockem robots have anything to do with Preditor Drones or key loggers.
http://ology.com/politics/robot-wars-begin-virus-strikes-us-unmanned-drone-fleet

Monday, October 3, 2011

Kindle Touch 3G (but not really)


The new Amazon Kindle Touch 3G only lets you use the 3G network to connect to the kindle store or Wikipedia. Everything else still has to connect via wi-fi. So, you're better off getting the wi-fi version which is $50 cheaper.

Of course, it's predecessor, while allowing you to surf anywhere on 3G, was black and white and shades of gray and it was clunky. So they went for less clunky and less access on the 3G network and stayed with the b&w screen.

Sunday, September 18, 2011

Crowdsourcing solves problem that baffled scientists


Researchers developed a video game that rewards players for solving the scientifically puzzles surrounding protein folding. It was called Fold It. Now, what made this more remarkable is that two groups of computer gamers had solved the problem in three weeks!

You see in the world of proteins, shape is everything. It is exceptionally difficult to design a computer to analyze and solve problems in 3D. Luckily, people are very good at 3-D pattern recognition.

There are other cases where scientists are enlisting the help of humans to solve problems humans can't. One of these is Planet Hunters, which began last December. As the website explains "the human brain is particularly good at discerning patterns or aberrations." Since the inception of Planet Hunters, volunteers have classified light curves that would take one person 60 years to process.

The History of Video Game Controllers

http://images.fastcompany.com/upload/Controllers2011-Full.jpg

Wednesday, September 14, 2011

LG SmartScan Mouse

Pretty cool. LG SmartScan mouse. Use it as a mouse. Use it as a scanner (for any document up to A3-size; 300dpi). It even does OCR. Save as PNG, BMP, JPEG, TIFF, PDF, XLS, or DOC. It runs for about $199.

This would be good for laptops.  Sure, you can take a picture using a cell phone, but then you have to send it to your email, log into your web email account, and download the photo.  And you do this with a document, it's a photo, not an OCR document.

So .... if you have a laptop and can see yourself scanning stuff, this may be a viable option.  And ... you can still use it as a mouse.
http://www.techradar.com/news/computing-components/peripherals/hands-on-lg-lsm-100-smartscan-mouse-review-1016097

Monday, August 1, 2011

Have Onstar? Will Hack

 At this year's White Hat convention, someone hacked an OnStar car using a cell phone and sending text messages.  The person was able to unlock the doors and start the car.

Now, as bad as this sounds (and it's pretty bad) the same type of technology is used for things like smart grids.

http://gizmodo.com/5825832/hackers-can-unlock-doors-start-some-cars-via-sms

Paper on Hacking the Smart Grid (PDF)

Sunday, July 10, 2011

Icon and Unicon

I learned about a language that's been around since 1977.  It's not "huge" probably because it wasn't developed by IBM, MIT, Sun, or any of the other computer concept powerhouses.  It was developed by Arizona University.  And some of the concepts of this language was carried over to other languages such as python and java.  However, none of these other languages are as powerful.

1. It's compiles to to byte code.  .Net and Java has used this idea.  So, if you want to complain about processing speed, you should be using C instead of Java or .Net.

2. It accepts failure.  Failure can happen and is accepted.  "What?"  Well, you can do something like this:
  while write(read())

 Yes, that does what it looks like it does.  While it reads data from the file, it writes it somewhere.  You can also do this:


3. Comparators don't return true or false.  They return the right most value.
So, you can do this:


 24 < x < y < 50


 This first checks to see if 24 < x.  If so, it returns x and then sees if x < y.
 If so, it returns y and then sees if y < 50.  Yes, it does all that in one line.


4. Everything works the same.  Let me explain.
  Want to write to the screen?  You use the write command.
  Want to write to the screen?  Well, screens use the write command.
  Want to write to a socket.  Guess what?  Yup!  Write.

  This gets better. 
  Want the length of a string?  *StringVariableName
  Want how many elements of a list?  *ListVariableName
  Want how many elements of a class object array? *ClassObjectArrayName


5. There are no types.  It's a type free language.

  So "20" > 25 works!
 
6. Icon has generators.  So, let's say in most languages, you do something like this.
    s:="the car and the ball is in the garage."
    x:=find("the",s)
    Most languages return the index of the first "the".  Well, you can ask again and get the second index of "the" or the third.
    So, you can have:

  every write(find("the",s))
    And yes, this prints the index of every instance of the in the sentence

    And yes, you can create your own generators

So, it's a very powerful language, especially for AI.  I highly recommend checking it out.  And best of all unicon (a Windows version of Icon) is FREE and better yet, all of the books for Icon and Unicon are FREE, including books by O'Reilly.  So, why use unicon?  Well, my professor wrote a program in C.  It ended up being 25,000 lines of code.  Then he rewrote it in C++.  It was over 14,000 lines of code.  Then he rewrote it using Icon.  It was just a little over 7,000 lines of code.  Yeah, wow!

So, check it out.
http://unicon.sourceforge.net/