Class attributes – not overriding but hiding

Couple days ago I was making code review with my colleague. The most interesting and confusing for me was discovered fact that polymorphysm and overriding in Java is not working for class attributes.

Actually I found the following code. We had two classes, one was extended by another one. And both were having constant declaration with the same name.

1
2
3
public class Class1 {
public final String CONSTANT = "CONSTANT_1";
}

and

1
2
3
public class Class2 extends Class1 {
public final String CONSTANT = "CONSTANT_2";
}

My thought was: “Wait… This code should not get compiled… In Class1 attribute is final, so it should not be allowed to overridden in subclass!”. But the code is getting compiled and no errors are shown.

Ok. So, why?

Read More

FOA series on fiber optics

FOA series on fiber optics

FOA series on fiber optics

Today I’ve found great video tutorials about fiber optic solutions by Fiber Optic Association

This is a bundle of 62 videos about various solutions, technologies, network architectures built on fiber optic basis. These lectures are not very long – approximately ~10min per lecture. They are quite simple to understand basic concepts and at the same time give overall information about fiber optic solutions.

Here are sample lectures from this series which I’ve already watched first of all:

Lecture 3: Optical fiber

Lecture 8: Coax cable

Lecure 24: Copper, Fiber or Wireless?

Lecture 25: FTTH – Fiber to the home

I definitely recommend these series to everyone who is interested in telecommunications. They will be definitely usefull for students who study telecom, network engeneers, OSS specialists etc.

 

Read More

How to make Eclipse working faster

Eclipse.orgToday I would like to share my experience about how to make Eclipse IDE loading and working faster. After performing the following steps I got my Eclipse Indigo working faster and made it more stable. I am absolutely sure these are not all possible options for speeding-up Elipse, and if you know something else useful about this, please, post your knowledge in comments.

Tweak eclipse.ini file

This is all about memory allocation for Eclipse instance running. On my workstation I’ve specified the following launching properties:

-Xmn128m -Xms1024m -Xmx1024m -Xss2m -XX:PermSize=128m -XX:MaxPermSize=128m -XX:+UseParallelGC

Turn off plugins activation on startup

Open Window->Preferences, then

Go to General->Startup and Shutdown

In the appeared list uncheck as much plug-ins as possible and leave checked only those plug-ins which are really needed for your development.

Read More

My iPhone 3GS is still compatible!

Today Apple Worldwide Developers Conference (WWDC 2011) took place in San-Francisco. And Apple presented couple new products there: OS X Lion update, iOS 5 and absolutely new cloud service iCloud.
For me the most interesting were news about iOS update – version 5. It includes more then 200! features and improvements. And I was really happy to figure out that my old good iPhone 3GS will be compatible with this new iOS:

Read More

The iOS location tracking file – why it is a security issue?

iOS location tracking file issueCouple days ago two security researchers Peter Warden and Alasdair Allan reported the problem with latest versions of iOS security. They discovered that Apple’s iOS 4 mobile operating system, found on both the iPhone and iPad, keeps a log of user’s locations and saves the data to a hidden file on the device.
“Location data is stored to a file called “consolidated.db,” which includes latitude and longitude coordinates and a timestamp. The coordinates are not “always exact,” they are “Pretty detailed.”" – researchers said. They’ve also made it clear there is no evidence to suggest that the data is being sent to anyone. They have provided a public tool that allows users to look at their own stored location data.

Along with this there was confirmed that this file “consolidated.db” is not being sent somewhere. It is just stored on the device.

I wonder, why people say this is a security issue?

The same story can be about contacts information or recent calls or photos/videos which are also stored on the device. And if someone get access to the device he or she will get access to contacts. And I think this information is much more important than user’s location history.

Following these researches’ report, ALL information stored on the device and not encrypted should be considered as a security issue. But it does not.

So I think that the location tracking problem is grossly exaggerated.

Read More

About keeping things simple.

About simplicity

About simplicity

Some time ago I used to see a great presentation by Dan North called Simplicity, The Way of the Unusual Architect. In it Dan North talks about the tendency developers-becoming-architects have to create bigger and more complex systems. Without trying to be simplistic, North argues for simplicity, offering strategies to extract the simple essence from complex situations.

While listening to this presentation with its jokes and real examples I was thinking about projects I did and HOW I did them. Unnecessary DAOs, abstraction layers, factories… All this was! But now I know that I will be much more careful when developing complicated and redundant architectural approaches.

I definitely recommend to listen to this talk for all programmers who tend to be a software architect.

Read More

Scrum vs Kanban

Kanban vs Scrum - making the most of both

Kanban vs Scrum - making the most of both

I’ve just finished reading good book by Henrik Kniberg: “Kanban vs Scrum. How to make the most of both”.

A lot of my colleagues say that they use Scrum as workflow management tool on their projects. As Scrum became kind of “mainstream” I was asking myself why we don’t use it on our current project? Is our project so bad, ugly or outmoded? Well… Actually no. Simply, Scrum is not suitable for every project. For my current project Kanban software development approach is much more suitable.

In his book Henrik Kniberg clears out how Kanban and Scrum might be useful in concrete environments. He illustrates similarities and differences between Scrum and Kanban, comparing for understanding, not for judgment. There is no such thing as good or bad tool – just a good or bad decision about when and how to use which tool.

I would recommend this book for reading to software developer, team leader and PMs. Very useful.

Read More

Logging from JAR file

It often turns out that when you in your program use external jar libraries you want to log third party logic from them to understand what happens there. Or your program has plug-in based architecture where each plug-in is a jar file developed by yourself or one from your team. Anyway, you want to log your program’s work as well as plug-ins’ behavior.

This article shows how to configure your application to log the work in third party modules – jar files. Let’s see this on sample application.

Read More

Publishing posts to blog directly from MS Word

I’ve just installed MS Office 2010. And found out that it is possible to publish documents from it directly to blog.

To do this one should click “Create” in menu “File” and then choose “Blog record”:

Read More

Why Androids better than iPhones?

Android vs iPhone

Android vs iPhone

Couple days ago again I met people who say that Androids are better than iPhones :) . So this question has risen again: Why Android-based phones are better than iPhones?

Do some of them have better hardware? Not sure actually.

Does Android operating system have higher quality than iOS does? I can definitely say – no.

Does Android OS have better user experience than iOS? No.

Are there more applications for Android? No. More amazing applications for Android? No.

Is Android community bigger than iPhone’s one? I don’t have definite values, but I can assume that no, it is not.

So WHY???

Android people say: It is open! It is cheaper!

Yes, it is… But guys! It is not better!

Read More

Page 1 of 212