Contacts

17 July 2019

Give Rules to your Firebase Firestore Data

Today people have a serious concern about offline first approach when building mobile application. The traditional way is using data persistence which is combined with Rest API call, make trigger and/or scheduler to push and pull the data. But there is another better way to handle this, using socket is better but more complex. So here come realtime database cloud provider such as Firebase, Realm and others.

When using Firebase you have to give rules to your data. These rules will give permission to the data. For example we want to user can only edit their own data, such as change basic user profile. If not, user can change other user's data.

Here is how we can do it. Sign in to your Firebase admin project https://console.firebase.google.com. I assume you already create Firestore database. Move to Rules tab.

Firestore Rules

By default your Firebase Forestore rules will looked like this:

28 February 2012

Python virtualenv, no zlib module was found

This is my story when for the first time using virtualenv in Python. My installed Python on Linux box was using 2.7 version, on the other side my current project is still using 2.6. Replacing 2.7 with 2.6 in my OS ? No, it's bad option. Virtualenv is the best way.

The problem occurred when I try to use Python 2.6 for my virtualenv using command below:

sudo virtualenv -p /usr/local/bin/python2.6 mysite2.com

sadly it produce error:


Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/virtualenv.py", line 17, in
import zlib

ImportError: No module named zlib

I try to use 2.7 rather than 2.6, it success, no error produced. So the problem is about my installed Python 2.6 thought.

Try to looking for information about this problem, finally I found. Someone said that that error is because there is no zlib installed on my Pyhton 2.6 when I install it.

By default when we make configure on Python source, zlib module is disabled. So we have to enable it explicitly. using
--with-zlib


So the configuration command becomes ./configure --with-zlib

now try
sudo virtualenv -p /usr/local/bin/python2.6 mysite2.com

And it successes. :)

14 January 2011

Play! Framework API

I had searching about Play Framework API many time before. But not found. The last way, I asked to the Play! group. And someone gave it's link to me.

Here it is,
http://www.playframework.org/documentation/api/1.1/index.html

So don't be confuse if you are looking for Play! API documentation.

Keep Play!-ing and enjoy...

09 January 2011

How to Install Broadcom 4312 Linux driver

Hello... Do you running Linux? So your installed Linux is not detecting your Broadcom 4312 device?

If your answers is YES, this article may be helpful.

I have looking for the firmware for my Broadcom 4312, I have installed it. But it doesn't work.

So the problem is, the recent Broadcom driver for Linux (said b43) is supporting most of Broadcom wireless device, but mine is not supported. Sadly. This is the link that will show you the list of supported device Broadcom 4312 Linux at that page, you can check whether your Broadcom is supported or not.

Now it's clear right? Since I written this article b43 was not supporting Broadcom 4312. What should we do?
Ok, check this out.

First you have to download the official Broadcom driver for linux. I have read that it is supporting our Broadcom 4312.
Download it from the links below:
you can also go to main page:

http://www.broadcom.com/support/802.11/linux_sta.php


Second, download your preferred driver and the readme.txt file.

Third, read the manual guide on redme.

Install it. And enjoy it.

Here I'm not explaining the detail howto's because the redme.txt guide is complete enough. So you can do the detail step by step by reading the readme file.

06 January 2011

Google groups API and Yahoo groups API

You may be already known that Google open a lot of API for it's application including; Google Map, Google Mail, Google Translate and many others, Yahoo! did too.

Sadly since this article is being written, there is no Google groups API and Yahoo! groups API. So sad.

So how the group based website such as Grouply retrieve the messages from groups? Are they using Mail API to retrieve groups messages? Well this is also possible but it will be so hard, as I think. Or Grouply build it's own API manually from scratch to communicate with Google and Yahoo! groups?

I'm still imagine how to retrieve those messages to my web application. Still thinking and finding idea.

You, do you have problem just like me? Have you solve it? Please let me know, how.

29 March 2010

Cellular Provider War

When I was seeing TV at night, I surprised about one advertisement. One of Cellular provider in my country attacking the other Cellular Provider. This advertiser said on the advertisement that the other Cellular Provider is bad (Indos*t is cheap and bad, X* is bad because of too many agreement for the features). Of course, this is really bad advertisement, not sportive enough. Good company should 'play the game' fairly.

Today, Cellular user is smarter to face many kinds of advertisement. So advertising a bad content just will make 'the boomerang come back deathly'.

23 August 2009

UML convention

For the last quarter I had a difficulty on receiving UML convention, what happened and what was wrong? The keyword of this problem is on faculties on my academic place where I study. Normally students follow the rule from the books (by reading modules), if they didn't know about something then they will ask to the modules. What the module just said is used. Sadly many faculties didn't understand about this (or might be didn't want to pay attention). Each faculty have their own rule on UML convention, when the other said A then the other said B. This is really bad, actually bad for academic environment. The good academic environment is where the educator of academic environment can solve the problem of heterogeneous convention. Make a conference to make convention(s). But it still not held yet, they (faculties) didn't want to care about this big problem. Sadly, the students of campus where I studied were became confuse because of inconsistence-uml-convention in my campus.

Generally UML convention/rule is available for International, but what the hell happen here.

27 April 2009

Where is my widget file...

I had been try to modify this blog design many days ago, and I made a backup for it including design and widget. Sadly I'm forget where I save it, oh God, I haven't the other.

Now, may be I have to start it from the beginning, looking for the everything I need.

24 April 2009

Backup data




I had lost my data for many times, and now I don't want it happen to me again. Data is something very precious for me. If I lost it, oh my God... dont't ever and never it happen again...
It is the big reason why I burned all of my data into DVD+R. So if the data in computer is erased or lost (and can't be recovered), then I have the copy, something simple but important.

08 February 2009

The power of kepepet

Last night my friend who studies in Padjajaran University came to me, he told me about his new business and he also gave me a book which have title “The Power of Kepepet” that have been bought. From the title it is looked like a freak book, what kind of book is it…

After my friend told me about his new business, then he asked me a help him for showing him a potential places for making a marketing near my place. I guided him along the street, seeing left right of street. We have not found the right place yet, but he still has the plan to spread his business near my places.

After we had been finished making an “observation”, then he decided to go home.

A moment after he gone, I was looking at the book given to me. “What kind of book is this?” Actually I knew it, but the title makes me still vexed. First I looked up the cover then I read from the most beginning page and to the next. What surprised I was! After preface page there is a closing page, this is naked style. It is looked freak but I do like it!! The closing is not the general or common closing but inside it the writer wanted his reader to close the bad memories. Do you understand what I mean? Yup, you are right. Before readers read the next page, writer wants to close their bad memories so it is the reason why he put the closing page off there. Looked from the style, it is not normal, but if I look at the sentences, there is a deep meaning.

The book is absolutely crazy and I take up my hate for this. The contents make me imagine clearly and concrete, because this book explain and talking about real actions. I’m satisfied of theory and what I need know are real action.

The point of this book is the writer said that establishing sense of urgency is the first step to begin in making a change and urgent condition is the biggest motivation resource. Just for example, what will you do if there is a lion that will hit you and you are dropped by a 3m wall, off course you will not think twice whether must you climb/ jump across the wall or not. In the normal condition may be you can’t do it but in such condition it is possible.





Thank you my friend for the book… Thank you very much.

06 February 2009

DANGER: Wrong example diagram in my UML book module.

When I was studying UML Diagrams using my module, there was something which made me to think twice and I was asking by myself; “Is this true, false or just incomplete?” Then I try to analyze and imagine about implementation of that diagram. Then I was sure that if this diagram is implemented in real life, it will be danger. Absolutely.

Now take a look at the picture below,

this is the example of Activity diagram in my UML book module. This is the activity diagram of customers of a bank to take their money on ATM. After the customers inserts ATM card then customer asked by machine to enter PIN. Then PIN will be validate, if customer enter the wrong PIN then the machine asked to enter it again, otherwise customer can continue to the transaction menus. There is wrong flow on the pictures (mistake?), the wrong flow I blocked using red color. Now keep your eyes on the red block. When the customer enters amount of money to be taken, there are no validation between current account and the amount that will be taken. If this diagram implemented in real project, it will be very dangerous. What will be happen is, the customers can take amount of money as they want. Just imagine, said that I have $500 in my account and then I take more than it, for example I take $1 00.000 , based on the diagram above I can do this, off course it hasn’t to be allowed. It must be forbidden by ATM machine. So the diagram have to implement validation which check between the amount of money will be taken and the current account, by implementing this validation the customers will be forbidden if they take the amount of money greater than their current account.

Although it is an example, but I think it’s is very important to be understood for the beginner.

Someone cheating me, but…

In the afternoon when I was in my class I got SMS which said,

You've got a voice mail from 0857xxxxxxxx. To hear it press *123*5*1*2*4*0857xxxxxxxx# Then press Yes or OK.

(I have translate it in English, the original SMS message is in Bahasa)

At the firs time I read this message I didn’t believe to this message. The problem is, why I had to check my voice mail using such way, even though I can check my voice mail using voice mail number such as 355 which used by my cellular operator.

Finally I try to find out something which wanted by sender,

first I press *123# OK,
then 5 OK,
1 OK,

When I was on the last number (but not the last step), I found that this step is a step which make user able to access point plusplus. And the next step, pressing

2 OK,
4 OK,

Is used to exchange point plusplus with SIM charge balance and then it will be transferred to the destination number.

Finally it was known that the sender of that SMS want to get my point plusplus which then will be exchanged with something (eg. SIM charge balance). Sadly, the sender couldn’t cheating me. :p

12 January 2009

My friend's FS account was hacked.



Yesterday my friend said that his Friendster account has been hacked.
Of course this is bad news for me. I don't know how his account was hacked

but he said that the last time he loged in to his Friendster account -- he used his own laptop. And he didn't let someone borrow his laptop.



One thing which make me surprised is -- the shout out of his friendster
is writen text "If you want your FS account back, call this number xxxxxxx".
If we read this sentence, as if there are something to be wanted.

The case like this usually happen when someone use the public computer
such as in internet cafe and he/she forget to clear the private data. It
can be happened on our own computer too of course, if we forget to 
clear our private data and then someone use our computer. In the

exthreme case it can be happened if someone spying us via network connection.

So be carefull whatever you do, for the security -- paranoid is good.

10 January 2009

Unupdated?

Not updated?

So long I don’t update my blog, and at this time I just try to make it up to date again. Many people say that blog is just like Tamagochi, it means we have to play it periodically, we can’t play it as want as we can. And now I try to play Tamagochi by its rule.
No matter how long I had not update it, for now I just want to give my blog a ‘new soul’. Just wait it… :D

Just a picture.
By the way to make a variation of contents on my blog, here I have my own photo which had modified using GIMP. What do you think about this? Is it funny, freak, nothing special or what? :D


21 October 2008

Got vacum


I had been got vacuum for many weeks on this blog. Do you know the reason? The reasons are: First, my internet connection was disconnected – now I have not my 24 hour internet connection, this was caused I had moved to other place for my live place – and there are no internet connection which can I used – so sad. Second, I was loosed many ideas, fooh… -- no inspiration. Now I try to wake up from my vacuum of blogging.

25 June 2008

My hard drive was falling..!


One week ago, when I started up my PC which running openSuse, there are a dialog appeared on desktop loading process. The dialog box said: "Your hard drive was falling". At first time I got this confirmation dialog box, I don't care about it. I just continuing used my PC. But today, I really want to know what happen in my hard disk. So I went to openSuse IRC forum, and I asked someone about this problem. Since I got the answer, I was surprised. Do you know why? Because the problem was really serious. Something bad happened on my hard drive was not as I thought. Before I got the answer, I thought the problem was just about logical partition problem. But apparently the problem was about physical partition. It means I have to replace this hard drive with the new one, of course, it's a must. If I don't replace it with the new one soon, my data on it will lose soon. Because the problem will grow up time per time, someone said this problem will cause a big problem called "death block" (I don't remember its terminology exactly), correct me if I false.
Ough this is realy serious problem, my old hard drive, I'm still loving you. Don't leave me please... Ohh... what pity I am... :-)

16 June 2008

Real Flying Man from Swiss

Do you know Super Man? Of course you do! I'm sure about it. He is the flying man on movies, the one of most well known super heroes. Will I talking about him? Haha... no I will not. Now I will talk about the true flying man. This is real flying man. First just take a look at this picture below.

He is Yves Rossy, many people called him as Fusion Man, the first man in the world to fly with wings and four jet engines strapped to his body. Many years before he had flight with his machine, and now at this year he do it again.

While he flight he have to control his body to navigate four jets on his body. This is very difficult and due to it he couldn’t saw the beauty of Alpen. Do you wan to know more about this news? Lets watch this video below. :D










07 June 2008

A guide in How To Join OpenSource Project: Gnome


Thousand of opensource project were created every years. Each project has its own requirements such as kind of programming language used, main library code, system environment ..... etc. Beside that each project was targeted for its purpose. E.g. Gnome targeted for desktop application, especially graphical user interface. Sadly many beginners who want to join to this opensource projects still don't know how to start it, what they have to do first, and so on; fortunately the Gnome team had made an official web guide for beginners who want to start joining opensource project named GnomeLove .

" GnomeLove is an initiative that aims to help people who want to get started contributing to GNOME. This page offers a collection of links to useful resources for aspiring developers, testers, documenters or simply GNOME enthusiasts. "
http://live.gnome.org/GnomeLove

This guide provides many information which will be needed by beginner. The information which provided are:

1. Contacts included mailing list E-Mail and IRC channel.
2. Getting started
3. Technical guides
4. Giving love to projects
____1). Case 1: You don't want to work on a specific project
____2). Case 2: You don't know which project you want to work on
____3). Case 3: You want to work on a specific project
____4). Case 4: You want to work on new projects or new features
5. GNOME Love Days
6. Articles and tutorials
____1). Tips & Tricks
____2). Internationalization
____3). GUI
____4). Other
7. Books

This Gnome project guide can be used as Starter Pack to join on Gnome project and will be useful for other opensource project.


_

30 May 2008

Multi Platform Programming Languages: a comparison.


Multi Platform Programming Language: a comparison.



vs


Java

There are many programming language used today. Based from tobe.com Java is the number 1 at the top position for its popularity and then followed by C, Visual Basic, PHP, C++ and the other. There are many reason why and how a programming language become popular, the one of the reasons is multi platform support. Yup, Java is the first well known good multi platform support. The programing language which support multi platform feature is not only Java, it is just one of example.

When we touch one of Java programming language once then we can go to the other kind of Java programming language technology such as Java EE, Java ME, JSP, JavaFX etc easily. It is caused every kinds of Java programming language has the similar style between each other. So when you expert in one of them, it will be easy to learn the other.

Although there are many advantages in Java and it was on first position than the other, it doesn't mean that Java doesn't have weakness. The weakness that most people don't like till now is its speed. The speed of Java is slower than the other multi platform programming language. For example when we playing game on PC which Java based or running desktop application it is looked like we saw the walking snail (very slow), hahaha... Yeah, walking snail... But I think this is not the big problem, event sometime it was.

In Java, multi platform features are like everything and it is one of reasons why many people learn this programming language for the main skill of programming. In addition it was very very object based, so it will no take longer time in developing application. And then there are thousand kinds of API in Java, so the developer can easily use it for developing application without write by his/herself. The APIs can be used for building application which run on Hand Phone, Smart Phone, PDA, PC, Aple Computer, Server etc. Its library is just like heaven of code.

Java compared with C++ based QT framework.

QT for many people who use Open Source software such as Linux would be very familiar. By using C++ as base programming the application created by QT framework was looked run stable and has a beauty style, because QT provides it. Today QT become easier for developing application. Just like Java, QT also provide library for Computer Platform and HandHeld, because QT is
cross-platform application framework for desktop and embedded development. There are four main kind of QT tool for developer: QT designer and QT Assistance, QT Linguist and Qmake. You can find the description about they all in [] www.trolltech.com [] .

When we see into QT framework scheme, it will be seen like Java scheme. Not completely same of course but it has the similar in framework layer, moreover QT describe on its scheme that QT has the same stage with Java. Look at this picture below:



Now the choice is in your hand. Which one will you choose? What is the reason(s) and How? It will depends on your needs. Finally I can't say which is the better one, because there are many reason and many point of view for each people, if you want to give your opinion(s) about it, then just comment to this post, please.
:D





Voodoo via phone cell (via SMS)


Voodoo via phone cell, this sound heard funny right? Is it real?
Many times ago in Indonesia there was a big issue about mobile phone network problem (mystery). This issue was not about someone who had hack the system of one of operator cellulars. But the issue was about SMS mystery, many people said that the SMS include the message saying that if there are a call which the phone number is looked unusual (red colored), please don't be received, it was a voodoo. Believe it or not, this issue had been make a top headline of many newspapers and news TV programs.
Now the sender of this SMS was caught by Indonesia police and Information Department Government. Hahaha... I think that's funny ... :D , how about you?

lustration (ist.)
detikinet.com