16 Dec 2011

Why we have Children

For those of you who know me well, my wife and I are expecting our first child in January, with G-d's help. I've been delving deeper into my Jewish roots over the last year and have been becoming more and more fascinated by the freely available explanations of life's concepts, questions and answers. Through what I've learned so far, I’d like to share what I currently believe to be the reason why so much emphasis is put on having children in Judaism. There is the clear responsibility of Jews being a light unto the world and being role models that are honest in all their dealings, relationships and overall good human beings, which would clearly conclude that it’s important to “be fruitful and multiply” so as to reach and cause positive effects on as much of humanity as possible.

 

However, there is a deeper meaning that goes closer to the relationship between children and their parents. One of the Ten Commandments is to respect your parents, which most of us know is a very hard commandment to keep at times. Of all the 248 positive commandments and 365 negative commandments that Jews are required to keep, why is this one given such importance? Here’s a better question: we know that the first five commandments are for the relationship of man to G-d, and the next five are for the relationship between man and man. Why is respecting your parents a commandment between man and G-d?

 

In a lot of cases, in both the Torah and therefore in Prayer, you’ll see G-d’s name being written in different ways. Sometimes you will see Elo-kim, which represents G-d’s attribute of “din” (justice) and sometimes you will see Yu-K-Vav-K representing His attribute of “rahamim” (mercy). If G-d were to exercise his attribute of justice at all times with no mercy, the world would be destroyed almost immediately given the atrocities that go on in the world. If He were to solely exercise his attribute of mercy, there would be no reward and punishment, causing total chaos in the world. What good are laws without judgment when they are broken?

 

Let’s parallel these two attributes to your parents. Parents will, in most cases, have to exercise both of these attributes. Usually it’s split between the father and mother. The father will take on the “educator” role and the one to serve out punishment when his children are misbehaving. The mother will be the one you run to when you need something and always be the one you are closest to because you can relate more closely to someone who shows constant love, or at least the way you perceive love at a young age. But the Torah tells you to respect them both, and actually puts the father before the mother in the wording. When we’re young and we don’t understand why we “can’t have” this, “can’t do” this, “can’t go” there, the answer is in most cases “you’ll understand when you’re older”. The truth is, when you finally reach the age where you understand why you were told “no” and denied things you wanted at a young age, you realize that even though it seemed to be a form of punishment or lack of love back then, today with your better developed intellect you understand that it was all done out of love. Your parents tried to direct you based on their own past experiences, and sometimes it takes the attribute of justice to help push you back in the proper direction.

 

This allows us to understand that everything G-d does is for the good. Whether you are suffering in your material existence by lack of funds, trouble at work, trouble with your health or your family’s health, these are all forms of communication between G-d and you to help drive you in a certain direction. And who better to do that than the One with the most experience of anyone you can possibly fathom. If you concentrate on this you will realize that there is no reason to be angry, upset, sad or depressed. You will realize that your life is constantly being helped and directed from above. It is true that we believe in free will and making our own choices, but we are also receiving constant divine assistance and are only given tests and trials in life that we have the potential to overcome.

 

So now that we understand the above, we realize that honoring your parents for both their attributes of justice and mercy is a direct way of honoring G-d by acknowledging that everything He does is for the good and we respect and love Him for it. Unfortunately, it sometimes takes the realization that you will be a father soon to understand and appreciate your parents and give G-d his proper tribute. We should all merit to extend this circle of learning to love and appreciate our parents and G-d by extension and hopefully sooner rather than later.


 

Baby

22 Sep 2011

How to create your Facebook Timeline before everyone else

If you heard about Facebook's new Timeline feature, you're probably one of the millions of people who won't have access to it until September 29th. But there is a trick to getting quick access, here's how to do it:

You will need a Facebook Application under your account first, so head over to:

https://developers.facebook.com/apps

Once you're there, click on the Create New App button:

Step1

Then fill out the form with bogus information:

Step2

Then you'll be able to edit your application. Click on Open Graph on the left side menu. And fill out the two field form to add a random action that a user can do (this doesn't matter, put anything).

Step3

Now when you hit Get Started, it will send you to the next page. You're done, don't even look at this page. Just head back to Facebook and you should see a special invite at the top from Facebook to access your page. Once you accept you'll be able to start using Timeline:

Timeline

 

 

12 Aug 2011

Staying Secure while tricking Facebook Applications

So let's be honest. Some Facebook applications are really awesome, but there have been so many spammy applications that most people are afraid to test out new apps for fear that the applications will start posting crap on your wall and spamming your friends. Luckily, the way Facebook's authentication for applications is setup, you can test out applications without giving them all the information they require. Here's how:

Let's say you want to check out Slide's FunApp

Post1

The problem is, you don't want to share your email address. You don't want it to be able to post on your wall while you're in the bathroom or on vacation, or any time for that matter. You also don't want it to be able to access your sensitive information at any time. You just want them to have access to your basic information.

But for some reason, Facebook is not allowing you to select NOT to share the rest. You feel like you're being forced to do it just to get past the first page and see what the app is about.

Here's the solution:

Go to the URL bar

Post2

Scroll to the end of it and delete the part after &perms=

Post3

It should now end like this:

Post4

Hit Enter and look at the new screen:

Post5

Now you can click Allow with no fears.

Post6

Hope you enjoyed this trick.

24 Jun 2011

Starting an Online Store (Step 1)

Onlinestore

Most new or potential business owners have no idea where to start. It begins with the inception of a new idea, either something that hasn't been done or sold before, or something that has been done, either way though, you need an online store.

You may have gone to friends to ask them if they know anyone who builds websites, at which point you were referred to someone who has built a few decent looking online stores. After you explain your project to to this person, he quotes you his standard $15,000 to $20,000 to get started. But did you know that most e-commerce websites nowadays use already developed systems that are completely customizable? If you find the right developer, who asks you the right questions to understand your project completely, you would be amazed at the talent that's out there and how quickly you can get running while still in budget.

Most people try to to become an "Amazon" from the start, they want to have everything figured out completely. They want the person they choose to develop their website to be someone full time who does Search Engine Optimization (so you show up in a good place on Google, Yahoo etc), PPC Management (to run ads), Affiliate network management (so you can pay marketers commission on the sales they bring you), Website development, Website maintenance, Website graphics design, Logo design, Importing products, the list goes on. What most people don't typically understand is that these are all individual jobs. The person that has all or the majority of those listed talents is already running their own company, they don't need your money.

Here's a tip, start small. Get your website developed by someone who's local. For the Montreal area, I recommend getting in touch with David Azoulay at Daversion.com. You'd be surprised at how much more affordable and organized your business model will have just gotten.

Once you have the website done the way you want it (website design, development, hosting), you're ready to proceed to the next steps.

More to come.

18 Sep 2010

Almost perfect desktop setup

People keep asking me how I get so productive when working. The trick is to properly setup your work environment so that everything is accessible extremely quickly. The last thing you want to do is maximize and minimize windows continually to go between data. One MAJOR enhancement, which I've only appreciated a lot recently, is to have more than one screen. However, you need to optimize the way you use the screens because otherwise you'll run out of space pretty quickly. I, personally, am not yet completely content with two screens, because I need to have chats, browser, programming, shells and documents open at the same time to work on projects. But this is how I optimized my setup with two screens for now (until my next screen comes in by mail).

Desktop-resized
Programming in a rotated screen on the left, with console/terminal windows connected to my servers. Browser and chats on the right. I'm also using Spaces so that I can switch between terminal windows, since Spaces allows you to specify programs to ALWAYS be present across spaces, you can designate a small part of your screen to always change while the rest always remains the same, depending on what you really need across different spaces.

16 Sep 2010

Setting up Geolocation with Maxmind's Apache Module

Geolocation
You have several options if you're trying to setup geolocation on your website. Geolocation allows you to determine where the user is most likely connecting from (Country, City etc) based on their IP address. Maxmind provides a decently accurate (99.5%) database and modules for free that you can setup pretty quickly on your server.

I am assuming you have PHP and Apache 2.x+ installed

To begin, log into your server and run the following commands:

cd /tmp
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz
wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
tar -xzvf GeoIP.tar.gz
cd GeoIP-*
./configure
make
sudo make install
cd ..
cp GeoIP.dat /usr/local/share/GeoIP/GeoIP.dat
wget http://geolite.maxmind.com/download/geoip/api/mod_geoip2/mod_geoip2_1.2.5.tar.gz
tar -xzvf mod_geoip2_1.2.5.tar.gz
cd mod_geoip2_1.2.5
apxs -i -a -L/usr/local/lib -I/usr/local/include -lGeoIP -c mod_geoip.c

 

Next you'll need to open your apache config file (either apache.conf or httpd.conf). Try

/etc/httpd/conf/httpd.conf

or

/etc/apache2/apache2.conf

 

You'll need to add this somewhere at the end:

GeoIPEnable On
GeoIPDBFile /usr/local/share/GeoIP/GeoIP.dat MemoryCache
GeoIPOutput Env

Now just restart apache using one of these commands (whichever one applies to you):

sudo apachectl restart
sudo /etc/init.d/httpd restart
sudo /etc/init.d/apache2 restart

And do a quick test by creating a new php script with the following code:

<?php
print_r($_SERVER);
?>

You should see new GEOIP variables that will tell you what country the user is in:

Array
(
   [GEOIP_ADDR] => 74.59.82.169
   [GEOIP_CONTINENT_CODE] => NA
   [GEOIP_COUNTRY_CODE] => CA
   [GEOIP_COUNTRY_NAME] => Canada
...

There you go, you can now use

$_SERVER['GEOIP_COUNTRY_CODE']

in PHP to redirect the user based on the country they're connecting from.

 

16 Sep 2010

Server-side browser detection

Sometimes you can't rely on JavaScript to detect the browser the user is on. Luckily, PHP has built in browser detection. You might say "sure, i'll just look at the user agent and take out find 'Chrome' or 'Safari' in there to know what browser the client is using", but actually the user agents might include BOTH of those if you're running Chrome under Mac. The solution is a user supported library that you specify in your php configuration file (php.ini)

Open up your php.ini file, usually located at /etc/php.ini

If you can't find it, just create a a simple php script with the following code, and run it:

<?php
phpinfo();
?>

You should see the location outputted:

Open up that file and search for the line that says:

[browscap]
;browscap = extra/browscap.ini

You'll now need to download the latest version of the browscap.ini (and update it as often as you like to keep current).

I decided to store mine in /etc/php_browscap.ini , so I ran this:

wget http://browsers.garykeith.com/stream.asp?PHP_BrowsCapINI > /etc/php_browscap.ini

Now that it was there, I went into my php.ini configuration and changed the above code to:

[browscap]
browscap = /etc/php_browscap.ini

(Notice I removed the semicolon (;) at the beginning of the line to uncomment it)

Then simply restart your webserver. One of these might work for you:

sudo apachectl restart
sudo /etc/init.d/httpd restart
sudo /etc/init.d/apache2 restart

And open a new php script, to try this code:

<?php
$tmp = get_browser(null, true);
print_r($tmp);
?>

When I access that script from Google Chrome I see:

Array
(
    [browser_name_regex] => §^mozilla/5\.0 \(macintosh; .*; .*mac os x.*; .*; rv:1\.9\.2.*\) gecko/.* firefox/3\.6.*$§
    [browser_name_pattern] => Mozilla/5.0 (Macintosh; *; *Mac OS X*; *; rv:1.9.2*) Gecko/* Firefox/3.6*
    [parent] => Firefox 3.6
    [platform] => MacOSX
    [browser] => Firefox
    [version] => 3.6
    [majorver] => 3
    [minorver] => 6
    [frames] => 1
    [iframes] => 1
    [tables] => 1
    [cookies] => 1
    [javaapplets] => 1
    [javascript] => 1
    [cssversion] => 3
    [supportscss] => 1
    [alpha] => 
    [beta] => 
    [win16] => 
    [win32] => 
    [win64] => 
    [backgroundsounds] => 
    [cdf] => 
    [vbscript] => 
    [activexcontrols] => 
    [isbanned] => 
    [ismobiledevice] => 
    [issyndicationreader] => 
    [crawler] => 
    [aol] => 
    [aolversion] => 0
)

So I know that the client is connecting using Firefox running on a Mac, and some of the capabilities of the browser (it won't detect if those are disabled though by the user).

Voila, you're done!

1 Sep 2010

Shyness and Ego

I had an interesting debate this morning in class. My Rabbi was debating whether or not shyness is a form of ego.

I immediately rejected that possibility, whenever you invite another person over for a meal, or are in a group of people with someone who is shy, it is easy to immediately place them as someone who feels inferior and does not express themselves as others because they don't feel they are at the same level.

However, I was told quickly not to immediately reject something because of my beliefs, and to think hard about it to see if there was a possibility that I was incorrect. So I did just that.

I read an excerpt of Eckhart Tolle on Shyness, Self-esteem and Ego, taken from an interview with Oprah Winfrey (not the best source, but interesting nonetheless).

 

OPRAH WINFREY (HOST): But what surprised me is that you say that often people who are also shy are also acting out of their egos. And you say whenever you feel superior or inferior to anyone, that's the ego in you. Why is that?
 
ECKHART TOLLE (AUTHOR, “A NEW EARTH”): Well, if you're shy, then what you fear is to be found wanting. But so you're not, you dare not...
 
OPRAH WINFREY: So the fear is that the attention may take the form of disapproval or criticism.
 
ECKHART TOLLE: Yes. So because you're afraid of that, whatever the disapproval or the criticism would represent an injury of your mentally made sense of self which is the ego. 

So it would, the image that I have of myself as the very capable person or whatever it is that I'm trying to uphold, if I encounter criticism, the ego immediately will be hurt.
And so a shy person would not dare to say anything because they're afraid of ego loss.  And.. sometimes that's mistaken for an egoless person.  

It's not.  And deep down inside the shy person or this person who is suffering from this sense of inferiority, there's the desire, the unexpressed desire to be superior.
And inside the person who acts superior who seems to have a big confident ego, is always the hidden fear that he might be inferior. And his whole acting out is to compensate for that hidden fear of being inferior.
 
OPRAH WINFREY: Okay. Behind every positive self consent is the hidden fear of not being good enough?
 
ECKHART TOLLE: Yes.
 
OPRAH WINFREY: Behind every negative self consent is the hidden desire of being the greatest or better than others.
 
ECKHART TOLLE: Yes.

 

 

It actually hit home quite a bit. I've been in a lot of situations where I've refrained from speaking, and looking back, it might have been for fear of saying the wrong thing and sounding inferior. It's a very big eye opener that things aren't always what they seem, and it helps to know that I now have a lot of work to do on myself.

 

In a recent quote from the movie American Gangster (2007):

The loudest one in the room is the weakest.

I can't help but think that it's still not enough to judge people by their actions, because you never know what struggles they are going through deep down inside.

 

30 Aug 2010

Communicating data between domains client-side

Jsonp
As a continuation of one of my recent articles on Guide for Newbies -- How Web Forms & The Internet Work, I briefly mentioned how cookies are set by domains to store information on your computer that are sent with every request to a server. Cookies are limited to being set by the specific domain you're on, otherwise you would be able to tamper with other people's cookies and either pretend to be them, or set sensitive information that you should not be able to access. The HTTP protocol protects itself relatively well against this. However, there are many cases where a website on a specific domain would like to pass information to another domain via the client connection, and allow data manipulation/processing by the secondary domain before sending the data back. Obviously we'd love for that transmission of data to be done by the client (me and you) visiting the first domain, to minimize scaling efforts by the first domain in managing all those connections.

JSON-p allows for just that. Webpages can inject javascript on their website from another domain, and pass data to that secondary domain through GET parameters, and have that secondary domain call a function that is already defined on the primary domain to post-process the information.

For example, if my website knew your Twittter nickname (mine's gmalca), and I wanted to access that user's posts to display them on my website (assuming this person's posts were public), I could simply add this piece of javascript to my webpage:

<script type="text/javascript" src="http://api.twitter.com/1/statuses/user_timeline.json?screen_name=gmalca&callback=processTweets"></script>

Then, on my first domain, I could create a function called processTweets, which will receive this information back from Twitter through the client, and process the list of Tweets for easy display on my webpage.

JSON-p does have its limitations though. For example, some browsers only allow 4096 characters to be passed through the URL, so if you're passing too much data over to the JSON-p script on the other end, you might hit a browser error. In addition, a lot of websites that use Ajax to communicate information over without reloading the page, use JSON-p internally with their own callback functions. The problem is that a malicious website could simply inject that code into their page if the user is already logged into this other domain, and get information sent back to them that might be sensitive to the user.

A lot of caution and good engineering need to be taken into account when designing websites, because when a user's information is at risk, your brand and website follow suit.

29 Aug 2010

Loving the Convert

Ekev(Deuteronomy 7:12-11:25)

Loving the Convert

"...[God] loves the stranger, giving him food and clothing. You must also show love toward the stranger, for you were strangers in the land of Egypt." (Deut. 10:18-19)

The Torah informs us of God's great love for the ger (convert). Since we are required to emulate God, it follows that we must also love the convert. Why, then, is it necessary to add, "for you were gerim in Egypt?"

Maimonides (Responsa No. 369) points out that the Torah commands us to respect and honor our parents and obey a prophet, but it does not command us to love them. Yet we are commanded to love the convert just as we are commanded to love God. To understand this we must understand the Torah concept of love.

The numerical value of "love" is the same as "one." Love is the product of unity between individuals, a recognition of a commonality and affinity. In our relationship to God this commonality is intrinsic, since we are created in God's image. Likewise, we share common responsibilities and goals with our fellow Jew. He is our peer in Torah and mitzvot. Parents and spouses, however, aside from the intrinsic commonality they share as Jews, may have nothing else in common.

Of course we must work to develop and nurture an affinity and commonality in the latter relationships. Love of a parent is an enhancement of honor; love of a spouse is a rabbinical directive (Maimonides, Ishus 15:19). And most certainly it is an ideal to love and honor the righteous. However, the Torah did not command us to create an affinity where it does not exist intrinsically. Rather, where such an affinity exists naturally, the Torah commands us to develop it.

 

* * *

 

STUDENT OF ABRAHAM

Maimonides, in the aforementioned response, writes to a convert whose mentor insulted him and called him a fool for asking a legitimate question:

...That which he called you a fool is very perplexing. One who left his father and mother, and his birthplace, and his nation, which is now in power, whose heart and mind led him to cling to a nation that is today detested by the nations of the world, ruled over by slaves, and to recognize and understand that their religion is the true and righteous one; one who understood the ways of Israel, and pursued God, and entered the path of holiness, and entered under the wings of the Divine presence, and sat at the dust of the feet of Moses, the master of all prophets; one who desires God's mitzvot, whose heart inspires him to draw close to bask in the light of life, and to ascend to the level of angels, to rejoice and take pleasure in the rapture of the righteous; one who cast out this mundane world from his heart and did not follow vain and idle things - is a person who reached this lofty stature to be called a fool?

God has not designated you a fool, but rather an intelligent and wise and understanding individual, who proceeds on proper paths, the student of Abraham, who likewise left his father and birthplace to follow God. May He Who blessed Abraham, and rewarded him in this world and the next world, bless and reward you properly in this world and the next. May He lengthen your days, so that you will be able to teach God's laws to His congregation, and may you merit to see all the consolations in store for Israel in the future, and may the good that God will do for us also devolve upon you, for God has spoken good concerning Israel.

 

* * *

 

HOLY SPARK

The convert has discovered on his own what the Jew was born with. Yet, the Sages tell us (Yevamos 48b), a convert sometimes experiences hardships after the conversion due to the fact that he procrastinated in converting. The Chida explains that every convert has an innate spark of holiness that is suppressed and lies dormant until he becomes aware of it and converts. He procrastinated in not acting upon that spark.

The famous convert and martyr, Avraham ben Avraham, posited that while each nation rejected the Torah when God offered it to them, there was a minority that was willing to accept the Torah. It is the descendants of that minority who eventually convert.

Through a proper halachic conversion, the convert transforms himself into a new individual. That spark of holiness is transformed into a Jewish soul and replaces his previous identity as a non-Jew. He is a newborn person with no halachic connection to his past.

God shows particular love and solicitude for the convert, feeding and clothing him. Food is man's basic necessity. Out of recognition of the elevated essence of the convert, God provides his essential necessities. Clothing represents one's honor. By providing clothing, God honors the convert.

 

* * *

 

STRANGERS IN EGYPT

On the one hand, we share an intrinsic affinity with that which the convert chose and accepted upon himself. Nevertheless, it is difficult to relate to the convert with a sense of total affinity, since his embrace of Torah and mitzvot was voluntary and ours was by birth. Therefore the Torah could not merely exhort us to emulate God in loving the convert, since there is an impediment to actually fulfilling this command. Thus the Torah adds, "for you were gerim in Egypt."

We can appreciate and identify with the convert, for in our national experience we also were quasi-gerim, when we left Egypt and accepted the Torah. Although we were already potentially Jews from the time of Abraham, and all that had to be done was bring out the potential that already existed at Sinai (see Gur Aryeh to Genesis 46:10); we experienced at Sinai a conversion, an acceptance of Torah and mitzvot not binding upon us at birth. Because we share that experience with the convert, we can be commanded to recognize and enhance that commonality.

The Sages comment (Yevamos 47a) that converts are as difficult for the Jewish people as spachas (an affliction of the skin). On the one hand, non-Jews who convert for ulterior motives, who basically masquerade as Jews, are a plague and sickness to the Jewish people.

On the other hand, Jews who convert for the reasons Maimonides describes and who undergo a halachic conversion are a pleasant affliction for the Jewish people. Just as tzora'as (skin affliction) is a lesson to goad one to repent and improve, the devotion and meticulous observance of mitzvot of a true convert are an indictment of those born Jews who are not as devoted, meticulous or appreciative of their heritage.

Published: Sunday, August 01, 2004

 

Gabriel Malca's Space

I'm a self taught programmer and affiliate marketer. Along with the brilliant minds of multiple business partners, I co-founded numerous entities and companies related to online marketing, while incorporating advancements in technology, speed and scale to stay ahead of the curve. My approach to software engineering, coupled with my experience in modeling social interaction and solving engineering problems, allows for quick and efficient development of new ideas, from prototypes to successful business models.

I hold a Bachelor degree in Software Engineering from McGill University.