Posts tagged ‘Internet’

One quick bug/tip that might save you lots of time. :) If you use Google’s appengine along with the webapp2 and using the Users module, you might encounter the following problem.

Recently, the ndb graduated and its python module changed from ndb to google.appengine.ext.ndb. Webapp2 is bundled along with the SDK of appengine, but it seems they forgot to update some modules in it, and they still use the previous package.

I encountered it when I tried to debug my application locally, using the webapp2 user & authentication module, the application crashes from the bad import. When you deploy the application to the appengine server, you must provide a version of the webapp2, which overrides this problem (this worked as a workaround for me at least), thus the problem will not occur. But locally, you must go the installation directory of the appengine and delete it manually.

I spotted this bug roughly a month ago (23/12/2011), and there may be some fixes on the mainstream webapp2 release.

Update (18/2/2012): The problem still persists in version 1.6.2 of the appengine SDK for python.

VN:F [1.9.14_1148]
Rating: 8.0/10 (1 vote cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Recently I was messing with Appengine’s pull queue and noticed the following. They did not offer a C/C++ API. All the other usual suspects are there, like python, Java, go, even PHP and Obj-C.

What happened to C/C++? It is not worth offering and maintaining any more an API for these two languages? Or google wants to promote go!, and pat the iOS developers with the Obj-C?

No, you cannot have a native app. That’s it! Maybe, because C/C++ do not offer by definition an HTTP protocol implementation.

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Recently I was doing some heavy-duty Javascript stuff for a web project. It was quite a while since the Firefox plug-in and in many ways, it was rather enjoyable experience (and in some other ways boring :-) ).

If you want to do some cool stuff in the web nowadays, the adoption of a Javascript library like jQuery is typical. I had some experience in the past, but the development process showed me that I was not so experienced as I thought. jQuery has good documentation that can be used as a reference, but it is not very usefull, when you want to understand some basic concepts and you are in a hurry of doing some stuff to work.

So, this blog entry has one goal, to transfer my experience of doing stuff with jQuery as a set of rules/advices that will save time to inexperienced users like me.

Rule #1: “When you are using jQuery, forget low-level Javascript functions”

It is a good practice to use always jQuery’s functions to do the stuff you want. Never rely on the low-leve Javascript function. The reason is simple. jQuery offers an encapsulating object for all the elements of the DOM tree. If you select some nodes with the jQuery selectors and then try to access their children with the common DOM function offered by the standard Javascript API, you are done for. You lose that encapsulation and you are back in black.

Rule #2: “Use # for the ‘id’ selector, ‘.’ for the class selector and always use backslashes in front of dots in ids”

No special reason, just remember these three examples:

  • $(‘#theCoolId’) – id selector
  • $(‘.myBigFatClass’) – class selector
  • $(‘#theCoolId\\.With\\.Dots’) – more complex id selector

Rule #3: “When you have to insert code into an element, use html()”

Simple as that, select the node and paste the code:

$('#theCoolNode').html('
<h1>Hey Stranger!</h1>
');

Rule #4: “By default the ajax() call is asynchronous”

… so if you want to load something, be sure to disable async, or else you will try to access something that is not ready. How can you do that? Simple!

$.ajax({
	type: "GET",
	dataType: "xml",
	url: "data/strings.xml",
	success: function(xml) { /* success */ },
	error: function() { /* error */ },
	async: false /* I will wait to load the XML */
});

Rule #5: “insertBefore() and insertAfter() take the selector as the parameter”

I do not know about you, but I always thought that it is logical for the insertAfter() and insertBefore() to select a node, then append the node. But this is not the way they are implemented. A small example:

$('<h1>Hey Joe!</h1>').insertAfter('#theCoolNode')

Rule #6: “It is always your fault”

Usually it is, accept it and try to understand how things are working :) , instead of trying to convince everyone that you are Mr. Right!

VN:F [1.9.14_1148]
Rating: 8.0/10 (1 vote cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Like the phoenix, from the ashes of Linux Format (Greek version) the brand-new Linux Inside was born. The first volume will be available at 27/1 (Greece only).

Linux Inside is a 100% Greek magazine that is written by the Linux community for the Linux community. It is hosted in http://www.linuxinside.gr/ (in Greek).

Feel free to visit it, tell us your opinion and freely participate in the forums.

VN:F [1.9.14_1148]
Rating: 9.8/10 (4 votes cast)
VN:F [1.9.14_1148]
Rating: +3 (from 3 votes)

No comment …

from my DSL modem.

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

After my analytics account is on, and I thought it is really interesting to see what happened with the famous browser (and OS) war. See for yourself.

Operating Systems Popularity

Operating Systems Popularity

Browser / OS Popularity

Browser / OS Popularity

Browser Popularity

Browser Popularity

It seems that Windows win, and Internet Explorer lost. Firefox won the browser war?

VN:F [1.9.14_1148]
Rating: 6.0/10 (1 vote cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Everyone that has a living (and networked) computer in his house has seen it. The revolution of our century in computing, the World Wide Web (WWW). Many consider it the next big-bang platform. Google, YouTube, and Facebook among others, deliver a variety of services for all kinds of taste. Social networks, video, music, and e-commerce is now done by web applications.

In addition, many traditional kind of applications are also web-ified, such as government facilities that have all transformed into e-Government. Yes, it is true. You don’t have to run anymore, two more clicks from your chair, and your dreams may come true.

Back then …

… i was a student. I remember surfing the web, that was comprised of simple, for today’s standards of course, HTML pages, downloading C compilers, and recent patches for video games. I also learned of dynamic content, CGI based applications with Perl and later with PHP. I even developed some web applications myself. Then i heard of Java and applets, more dynamic content in a stateless world. Cookies, hidden parameters, hashes, sessions, all concepts that gave birth to the modern era of computing.

Best effort …

… is what the standard says about HTML rendering. In simple english, “do the best you can” and in a more simple manner “write the worst code ever, it is my fault, not yours”. What happens if you open the <b> tag and never close it? Nothing at all. What even happens if you do not know what <custom_tag> means? Just ignore it.

In this platform, we based our dreams regarding the future of our applications, and to make it worse we decided to make it even worse. And we did it beautifully, we took the task of web design from the computer scientist and we created a bunch of incompatible technologies.

The Tower of Babel

Indeed the world-wide web consists of a bunch of unrelated, badly coupled technologies. For example, we have CSS and HTML. What was the key idea behind them? Who knows? We created HTML that followed a specific notation, that obeyed the tag open – tag close rule and then we decided (years later) to defy it and create something like the X configuration files. Why is that? Nobody knows, and keep in mind that they were proposed by the same organisation, W3C.

In all this, we tried to give more juice to it by adding a javascript, that simply added HTML in the start, and later of modified the DOM tree of a page. Superb idea, we created a scripting language that is domain-specific but not exactly to serve its purpose. Javascript has the design concept of a general-purpose programming language, yet we use it like XSLT, to modify XML data. I am sure it is fun to traverse node lists and create new tags the hard way.

At the end, to complete our divine masterpiece, we made the ultimate move. We created incompatible web browsers, that had unique features. So it is nice that a web developer, must have Internet Explorer, Opera, Safari, Firefox, Chrome and Camino to check if the web site works and is displayed correctly. And yes each browser it is like a platform with unique add-ons, interpretation and implementation of the web standards (what?). So what if the menu is an inch lower in Internet Explorer? We have to live with it.

I will not refer to Java applets, flash or Silverlight. All those technologies are helping to increase the complexity not reduce it, introducing more and more diverse features.

Give the Web Back …

… to the computer scientists, because now it is a playground. Everyone can do whatever he wants and get away with it. The web is now built on unstable ground, and it will soon collapse. See all the web apps, like gmail. Try to estimate the effort behind the creation of it. You think it is fun or creative to do it? Or do you think that it would require half the time of creating it in a decent development platform? No, I’m not trying to estimate the development time here, i know it is a very difficult task.

Programmers Love the Web …

… and they want the web to love them back. I do not think i have the required skill to propose things to do it better, so i want you to add a big IMHO (In My Humble Opinion) just before every bullet that follows. So i think that it is time to …

… to enforce the standards. And i mean no best effort service anymore. The web has now penetrated all households and all businesses, time to mature.

… to create a compatible platform. No more dozens of browsers with unique behavior. I want it to work the same way in each one of them. Why LaTeX does it? Do the same.

… to find a decent scripting language. I think javascript is not enough. We create specialized languages for this kind of work.

… to try and find a common syntax for all the related technologies. We like XML notation? Stick with it! Do not create more and more languages that cause diversity. We like humans to learn and use it.

… to find ONE standard for HTML. I do not care who will it be. But it is funny to see standards like, XHTML, HTML 4.01, strict, and transitional.

In the End …

… we all use it. Even the most non-technical user knows that <b>text</b> prints the text bold. We all like blogging, forums and googling. Let’s make it work the right way.

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

I always argue with network administrators. They use firewalls to block and monitor the traffic of the intranet and refuse to open any other port except 80 (of course) for any other service.

Ports in TCP and UDP exist for the sole reason for multiplexing many virtual channels on one physical medium. Those guys (and many others) seem to forget that and re-invent multiplexing techniques on higher layers, using web services for example (See Figure below).

How can you stay in the market? Say the same technology again and again.

How can you stay in the market? Sell the same technology again and again.

Original Post

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Chrome for Mac OS X is here!

Chrome rocks!

Chrome rocks!

But still they have to iron out some bugs.

I'm sure they are going to fix that in the next version.

I am sure they are going to fix that in the next version!

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Maybe their logo designers were not very creative after all.

Google Chrome Logo Vs AVG Logo

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)