lunes, 1 de febrero de 2016

Two new websites, one new blog

Hey, long time no write!

I've been busy working at developing www.olympian.mx and the recently-launched www.sharemybytes.com. Both are great examples of coding.

Olympian.mx was created using Django. Although it was my first time using the framework, I found it extremely easy and fast to use. Backend integration is seamless, although you do have to get used to working with versioned migrations and how to mange them in a production environment. One of the coolest things that 'came in the box' with Django was the admin site. This site contains an already built UI for people in the backoffice to work with and generate their analysis. No need to give them direct permission on the actual database.
The only letdown from Django was the frontend templates and lack of support or consideration for AJAX calls. although the DRY mentality is kept with the frontend, and there are ways to avoid writing every field in each form, I find that the templates are way too coupled with the backend. This is a problem because having a separate UI designer and frontend engineer working to develop the website, it creates a need for the FE to learn the templating system, which can slow down the development of the website.

Sharemybytes.com on the other hand was created solely by me. I used a plain old LAMP server to serve the website using PHP. After having developed websites in Django and Java it felt weird to use the same language to develop the backend code as well as the frontend one. It's like creating a website using JSPs for the backend too. The fun part about www.sharemybytes.com is the idea of creating a web file host with an unlimited capacity. The whole idea relies on living the storage to the user and using the server only as a bridge between the host and the client. Using AJAX leases I was able to pull and push files on demand without any user interaction. Very interesting project.

Finally I have been also writing on www.aboutworld.com. I still have only 6 posts which is frequency of about 1 post per month. However it has some 500 monthly views which is pretty good.

miércoles, 26 de agosto de 2015

martes, 31 de marzo de 2015

Why do I run

I know this is yet another off topic entry, but I think it's worth it. This little piece of text is dedicated to all those people who don't understand why I like to run.

Running has many parts about it. The first one which many people do not know about is the focus it gives you. I strongly believe, and it works for me that way, that running is another form of meditation. You might be thinking "how would anyone be able to focus when running?". But you have to look at it this way: Zen meditation claims that the pain that comes from sitting in the same position for a long time is a good thing since it helps you stay in the present. When running there are tons of pain sources and other bodily signals which anchor you to the present time. In meditation you normally focus on your breath. When running you normally focus on your body; how your legs are striking the ground, how your bowels are holding up, how your arms starting feeling numb after a while, how your breathing needs to be kept in check so as to not get tired easily. In meditation you hold a position for a long time. In running even if you are not static, after the first 5 minutes the running part becomes an unconscious movement, letting you focus on the details of what is happening.

Running is also excellent because like any sport it gives you the chance to move your body and interact heavily with your surrounding. I think this is a key part to balance out sitting in front of a computer for hours. Alma sana in corpore sano.

Another thing which running gives you is the ability to push the boundaries of what you think you are able to do. Once after running a 10K, half-marathon or the marathon you suddenly realize that what you thought were your limits is wrong. This is a very powerful realization because it extends to other fields. It lets you see that the mind is a really strong detractor from a lot of activities where you would otherwise go further than you had imagined.

Yet another benefit of running is that it boosts your serotonin levels. Running will make you happy, that's for sure. I think people that take antidepressants should really try out first running. It is free, it is natural and when done right the only side effect is getting fit.

There probably are many more reasons why to run, but I would like to mention my favorite one. Imagine you are at the race day. You entered your first marathon race after training hard running 60+ km every week. You have trained so much, that you can notice through your skin muscles and bones you had never seen before. Now imagine you are at kilometer 28, only 14 to go, and everything is going great except you suddenly hit the wall. You suddenly feel like Mike Tyson punches you hard in the stomach and have to slow down, then you realize your muscles are so close of cramping that you become afraid of moving your leg an inch too far leading to total failure, your knee ligaments start feeling like an over tensioned guitar string about to snap, you soles are hurting bad from the various blisters accumulated thus far, your arms start feeling numb because of dehydration, your mouth is dry and your skin is already on its third layer of minerals left over from evaporated sweat. And as if all this wasn't enough to handle,  the worst part is that if you let your brain loose, it starts talking you into giving up, it feeds you with all kinds of excuses and reasons why you won't finish the race. It is at this moment, when every part of the body has left you, that you see who you really are. Because at that moment the only thing carrying you forward is what I believe to be the purest form of yourself. At that moment the one taking the decision to continue is only yourself bereft of any other biases. And understanding that you alone without any help can push forward is a life defining realization. Coming to realize how strong your will of power can be is a wondrous and powerful sensation.

For me specifically it has let me realize what life really is. Life is about deciding what the world should be and not letting the world define you. It is about controlling your environment and guiding it towards where you want it to go. You and your life are that which you want them to be. The possibilities of what we can do are endless, bound only by our physical limitations. There are people who think that if you are born good at something then that's who you are, and you should do that for the rest of your life. I think that is completely wrong. I think what should guide your life is what you think it should be and nothing else. This is also a very strong teaching in leadership. I think that a good leader can only be so if he realizes that he first is a leader of himself and maybe then of others. We all need to lead ourselves through our lives, and we cannot begin to make a change until we realize it.

Because of these reasons and many others, I like to run.

miércoles, 25 de marzo de 2015

Some random thoughts

Some life FAQs and my answers:

1- Is there a God?

Up to you. There is no way you can prove either way so it really is waste of time to talk about it.

2- Why are we here?

No one knows. The only thing we do know is that we started of from some cells in some ocean. The cell's objective (and what we call life) was to survive and to reproduce. It seems like life's objective is to control as much energy and matter as possible. But again is up to you.

3- What is consciousness?

And yet again, no one knows. Personally I like a lot Hofstadter ideas as written in his book The Eternal Golden Braid. Mixing self representation with swarm intelligence lets you take a peek into the great mystery that consciousness represents. However I think it goes much deeper than that.
I think that in order for a system to be conscious, the first step is for the system to be able to simulate its environment. Once it can simulate it, then it can represent itself in this new environment.
But that's just the first step. I think life in embedded in the world of ideas, with each idea being in its own turn another living system, fighting for its survival in the brain.  Remember how life struggles to reproduce and control? I think that from the moment humans were able to talk to each other, ideas have been leaping from human to human in there attempt to reproduce and survive. Ideas which behave as if they were alive, trying to control as much space as they can. And so what if consciousness arises from such a setting? What if consciousness is just life occupying the space created by our minds trying to simulate the world?
Conjunctures only, but fun to think about!  By the way, would be a good idea to have an AI system based off of how ideas fight each other to gain "brain time". Maybe it could solve some optimization problems?

martes, 3 de marzo de 2015

Posting some cool sites I've been working on

Hey so I've been programming some webapps. I have been using my own home-cooked webapp framework, but will move maybe to struts for my next project. In the meantime I leave you these jewels:

www.apartmentsml.com
www.tm1consultant.com | www.tm1group.com
mindflow.hostzi.com

martes, 25 de noviembre de 2014

Git checkout all deleted files

So the scenario is I removed a bunch files temporarily or by mistake and now I want them back. Instead of going manually one by one with git status, just run

git status | grep deleted | cut -f5 -d' ' | xargs git checkout

This can be used to do many more things like deal with untracked files and other type of problems.

sábado, 25 de octubre de 2014

Building a dev box under $800

Tired of developing on my gaming laptop virtualizing Ubuntu, I now decided it is time to use my old PC case and build meself a new computer. I went for a decent processor and video card but good RAM and SSD drive. This are my final specs:

CPU: Intel Core i5-4670K 3.4GHz Quad-Core Processor  ($234.99 @ Newegg)
CPU Cooler: Arctic Cooling Freezer 7 Pro Rev.2 45.0 CFM Fluid Dynamic Bearing CPU Cooler  ($17.99 @ Amazon)
Motherboard: Asus Z87-A ATX LGA1150 Motherboard  ($119.98 @ SuperBiiz)
Memory: PNY XLR8 16GB (2 x 8GB) DDR3-1600 Memory  ($134.00 @ Amazon)
Storage: Sandisk Ultra Plus 128GB 2.5" Solid State Drive  ($65.98 @ Newegg)
Storage: Western Digital Caviar Blue 1TB 3.5" 7200RPM Internal Hard Drive  ($54.99 @ Amazon)
Video Card: Gigabyte GeForce GTX 750 1GB Video Card  ($99.99 @ Newegg)
Wireless Network Adapter: Intel 7260HMWDTX1 802.11a/b/g/n/ac PCI-Express x1 Wi-Fi Adapter  ($45.99 @ SuperBiiz)
Total: $773.91
Generated by PCPartPicker 2014-10-25 22:46 EDT-0400

The first thing that gets your attention is the i5. Why not i7? The price difference for the i7 version of the processor is almost $100. What do you get with the i7 4770K? You get 2mb more of L3 cache memory and hyperthreading which bumps up your thread count to 8 even though you are still at quad core. IMO these advantages do not merit $100 so that is why I went with the i5.

Other important things here is the 2x8GB at 1600 for only $134. Since the motherboard has 4 slots, I will still have space to go to 32GB if necessary. 128GB of SSD should be enough for OS pagination (in case 16GB of RAM is not enough for the main bins). The video card is just on the threshold between budget and gaming video cards. It is enough in case you want to do some blender renderings or some steam gaming, but still not as expensive.

Note that it is still missing I/O accessories such as sound card, keyboard, monitor and mouse.