AngkotCayley – Learning with Graph Databases

This post is long overdue, so the hell with it.

angkotcayley

I loved learning new stuff, especially ones that I never got the chance to learn at school and I got the chance to get an internship at Ebdesk office in Bandung.

One of my jobs is to build a software for analyzing public transportation in Bandung, especially that with angkot because there so many of them here. My boss require me to try Cayley https://github.com/cayleygraph/cayley

I had no introduction to graph databases or anything about it, so I research everything about it and blown away on how all of it works. All of my experiences with databases are basic SQL and to see how every node connected to form a graph.

My first step is to research on angkot lanes, angkot is much different than taxi’s or buses they stop whenever they like. this caused the problem since I planned to make a node on every time they stop.

10-01-05_peta-angkot_dasar

I decided that each road is a node that connected to the next road it passed through so I made this n-quads to connect the road.

I am from Indonesia and if you confused on some of the vocab this some to help you understood.

jalan – road, kode – code, trayek – route, nama – name

nquad1

nquad2

nquad3

And then I run cayley with the following query

g.V(‘/data/road/nama_jalan’).Tag(‘source’).Out(‘/data/angkot’).Tag(‘target’).All()

roadconnection

Cayley use javascript with some gremlin inspired graph object, so it felt at home if you use javascript or do web programming regularly.

Cayley also support visualization, after learning on how it works I was amazed on the result

g.V().Tag(‘source’).Both(‘/data/angkot’, null).Tag(‘target’).All()

visualization.png

In conclusion, Cayley is wonderful if you want to try visualizing data based on graph databases, even that I used Cayley built-in databases I able to produce the result that I wanted.

Next time, I will be talking on how I implemented this newly learned technology for end-user needs also what I learn about Graph Databases with TitanDB and it’s pure Gremlin Query Language.

Living with Linux – Ubuntu

I have been an avid windows user for a really long time, developing, browsing the web and gaming. That platform was one awesomeness to use.

Time goes by and I managed to upgrade to Windows 8 Consumer Preview and oh boy, That was one worse decision that I ever take. Windows 8 was a step back from the much beloved Windows 7 that still I use at one of my old laptop.

Microsoft decision to move forward to touch-friendly and mobile-oriented operating system was hated by many including me, I thought of alternative at that time and decided to return to my old choice of operating systems. Ubuntu Linux.

I have using linux as my secondary operating system and even dual-boot most of my hardware with a different set of distros and flavors. From the tiny-sized Slitaz http://www.slitaz.org/en/ to the beautiful elementaryOS http://elementary.io/.

My friend always asks me if using Linux are a good choice?

My answer is yes, also it’s not as hard as everybody said. My first day using linux when I was at my junior high school just to check it out using VirtualBox and a good old Ubuntu Lucid with GNOME flavor.

Finding application are a bitch if you are a beginner back then, except one thing.

Ubuntu Software Center, the one and great store for finding an application to install rather than browse and try each .deb installation and its component. Where do you thing Mac App Store came with that idea?

As I grow old enough and found my passion with programming, I was felt that Visual Studio and Notepad++ was my life. I learn to code one by one using those two software. And when I switched to Linux the choice wasn’t easier being a .NET programmer as I do for hobby and now for living.

I tried to use their default apps, gedit. and I thing it doesn’t satisfy me because it had lack of feature from Notepad++ that was based on Scintilla. I keep browsing for an alternative until I decided to try Sublime Text. I’m not a fan of proprietary software and always try to find and alternative…. until I pirated that damn thing with one of the best torrent client on linux or maybe at other platform; Transmission-Qt.

I use and play around with it and fallen love with that thing. I use that as my primary code editor and even able to avoided IDEs for creating a website. But last year was a big win for me when Microsoft announced that .NET core was going to be open-sourced and coming with another great free and open source code editor. The Visual Studio Code.

Programming aside, there was a good bunch of utilities for a programmer like me on Linux. FileZilla, XAMPP, NetBeans, and more… another programmer paradise.

For media there always VLC for me and Rhythmbox and Clementine for music playback. There also Spotify that I was frequently use, the problem only came with performance.

You see, linux has a rather limited hardware driver support and even my damned Laptop Bluetooth keep turning on/off by itself.

The graphical performance hits harder than using windows because I used an Nvidia hardware with its notoriety for linux users. I can play a 1080p with my 10 inch laptop with Intel HD Graphics on windows just fine, in Linux the fps drop frequently to 15-20fps.

Also for gaming, linux was a bad choice for many, including SteamOS that was just a glorified Big Picture mode. I always wish that hardware maker could more care with this platform so I can love to game as I love it on my Windows.

So, overall? If you want to try linux, I said go ahead with it. For a normal use and developing like me it was a great platform for newbie or just starting to code.

For general use, there always an alternative application from windows in linux. Even for your office work there always LibreOffice and OpenOffice as they both was a great replacement and even free.

So, try to make a switch. I’m sure there one point that Linux excels for you.

 

Another Project – ASEF “The Story Teller Project”

This is one project that I currently working on.

My teacher assigned me to help with her project on ASEF ClassNet Program that can be accessed here http://aec.asef.org/

One of the project that ASEF ClassNet working on is Story Teller Project that managed by my teacher, the one Intan Kandhi Sukmi, she assigned me to help her create a website so the student that join the project could share the story to each other with ease.

At first, the project started at my mid-term exam so I really had a small amount of time to create and finish the project, one of them is template for the home page. I planned to use WordPress as a static page but I found most of the theme are too heavy and slow for my low-cost web hosting service that I use.

I decided to use a free and template from andreasviklund.com with the Brussels-light theme on it. I use the WordPress as a blog service for the student to post and let the teacher approve before the story published.

The theme I used is Twenty Fourteen theme because it had the simplicity and menu placement that I really liked. I set every new registered user with contributor Role model and I edited the role using WPFront Role Editor that also allow me to define a different menu placement for different user. (guest, administrator, contributor).

I removed most of the Visual Editor JavaScript so the post setting only allow Text only editor to preserve the performance with this hosting I used. But still maintain the capability to post via other with Jet Pack functionality that also allow the user to proofread the text before it published as it was very important for student that her or his country isn’t using English as their main language as neither do I.

I use a couple of handy plugins to enhance the user experience and administrator control and one of them was Sticky Note that I and my teacher used to post the rules and tutorial in the contributor WP Dashboard.

Some of my friend suggested that I use a Cache plugin to improve the performance but after I continually tested it, the result was unreliable within in a long run. I decided to register on a free CloudFlare account to manage this site.

The result was incredible, I received a most improvement in speed after using the default cache with Auto Minify and Rocket Loader to improve the JavaScript performance that most of the impact caused by the JetPack scripts.

After all of this the website was almost ready to use and I’m still working to improve everything on it, including increasing the performance score on GTMetrix and PingDom.

Feel free to browse the website, although it still isn’t finished yet.

http://storytellerproject.cf/

And if you’re a student and want to join the project that will started this month, you can contact my teacher at intan.kandhi@gmail.com

 

One of my useless project – VirAtt Virus Scanner

This is VirAtt Virus Scanner, one of my project that I used to help me learn how to code a computer program using the ancient Visual Basic 6 Professional. ‘I pirated it, of course.

The original source code was gathered in planetsourcecode that I downloaded because I was curious with the algorithm of this simple and useful code for learning a file I/O in VB.

I cannot give you the original link to the source code because planetsourcecode receiving a major data loss this couple month and destroying many of my early project and this original source code in question.

The detection mechanism was very simple and straightforward, the program basically check the existence of a file determined in a database that I created within the code variables, when detected the listbox in the form will flashed red on certain item that was detected and offer to kill and unload virus.

The kill part was to end the running process in task manager with the same filename on the database, and unload basically tried to delete the file.

I modified the engine to fix some broken registry if the virus tried to disabled some crucial windows utilities such as Task Manager, Registry Editor, and MSConfig.

The software was released in open-source with GPLv3 license as the original source code was released with a GPLv2.

Feel free to modify or just learn a basic on file and registry manipulation using VB6.

http://sourceforge.net/projects/viratt/

About

Hello and welcome to my blog!

WP_20150827_004

 

My name is Gema Aji Wardian and I came from Bandung, Indonesia. I live by learning to code and developing computer and mobile software, from this blog you’ll find what I’m working with and anything on my life that I like to share too.

So enjoy to read, and give me your feedback by commenting or even e-mail me to improve myself, my software, or this blog overall.

E-Mail me at : gema_wardian@hotmail.com

And btw, I love cats and I’m on the dark side.

Also my Dota2 MMR sucked hard, real hard.