Monday, August 26, 2013

Do I need a “flag”?

Few days ago I had an idea I can’t get off my head: Do I really need the “flag” property? Now I use it to define importance of an entity and mostly to disable certain particles or entities, but all these things can be done by “order” property.

I don’t use order for entities, so it may act as flag. 0 = disabled, 1 = new, 2 = unverified, 3 = verified. I use order for date or appearence length of an actor in particular movie, so it already has a value.

I feel there’s no need for the “flag” anymore. It came from the time I thought I may stuck four different “values” into single particle, but this was just a wrong assuption. Everything should be in the value only, everything else is additional value. DateTime in order is great, but only as a “timestamp” for the value. And if I fill the timestamp, why would I want to hide it? I always can set order for the entity to zero and it won’t show up anyway.

Sure, there might be situations, when I need to hide the particle without losing any information in the order property, but more often I will take advantage of smaller data model and less code in the framework.

Wednesday, August 14, 2013

Hello World Showcase

One day I had an interesting idea. I already have QetriX project template in several languages for several platforms: PHP, JavaScript, C# (WinForms, WPF, ASPX), Java (Spring, Android) and Objective-C for iOS and OS X. Everything does the same and is coded in the same way.

Why not create a something like Hello World showcase? Usually, “Hello World” is just a simple piece of code to show how the programming language works. I have quite simple yet complete data solution, where I can demonstrate much more – the whole programming at glance. And not only the code, but different data management approaches (like databases) as well!

As I mentioned before, I’m very aware my programming habits is nothing to demonstrate. Also, each platform and language works differently and the same construction might be efficient in one language, but highly inefficient or even impossible to do in the other(s).

Therefore I decided to make more than one version for platforms where applicable – one in “compatibility mode”, where all constructions will be the same (or at least very similar) across all languages and it will be easy to compare programming techniques between different languages and platforms, and one or more in “lang native mode”, where the most efficient techniques and best practices will be in use.

In PHP there are many different approaches. Therefore I’ll try to create one QetriX in pure functional programming, one in reasonably objective programming and one in pure OOP. I’ve just got an idea to even use different frameworks and CMS (CodeIgniter, Zend, Nette, Symfony, FatFree, CakePHP, WordPress, MediaWiki...) to recreate QetriX in them.

It would be nice to see the difference between them, how many lines of code and what performance results it will provide. I’m quite looking forward to do this.

Sunday, August 4, 2013

FindTheBest.com

Holy cow, how did it manage to hide from me the whole time? I don’t remember how I came across this website, but I have to admit, when I spent a few minutes clicking here and there on it, I was truly dumbfounded.

It isn’t really IT, but it is so damn close to what I’m working at. Sure, I knew there’s a huge competition since I started, but all those freebases and wolfram|alphas were either different, ugly or hard to use. This is none of them. The only good thing for me is that the main turf for the website are mostly the States and I’m aiming higher.

On the other hand, they have a huge amount of pictures, awesome graphs, nice filtering options with excellent results interpretation, overwhelming wizard-like “assist me” function and much, much more.

When I shook the surprise off, I started to pick features I like and think how to implement them into QetriX.

  • Classifications should have default icon and picture.
  • For attributes there should be an information about what value (lower/higher) is better. A weights for this would be nice too.
  • User friendly filtering, using not just values and check boxes, but nice min-max sliders as well. Domains will be handy here.
  • Entity should me even more specific, with charts and tables.
  • Related entities are necessary.
  • Besides the main entity it would be handy to attach small info-box for related entities too, such as manufacturer, superior area unit, homeland etc.
  • User ratings and comments would be there again. Comments with rating also (up/down vote, likes...).

I assume it’s also written in PHP, since /index.php returns no 404. I was trying to find their data sources, but I found only a simple statement: “We obtain our information from three sources: Public databases, primary sources (manufacturer websites) and expert sources.“ Well, sincerely I didn’t expect much more, since data sources are the main business secrets here.