Showing posts with label musings. Show all posts
Showing posts with label musings. Show all posts

Learning brush strokes I

I was today looking at one of my glasses paintings I made in junior school years. I had drawn two butterflies with free hand using a black liner. While this is not something big I noticed, both the butterflies have different sizes and shapes but they have the same curves. The depth, the arcs at a very minute level (half a centimeter) reflect the same hand which drew them, anyone looking at the two pictures can infer it.

I wonder if there is a way to learn this. Not just learning what type of object it is or what species of butterflies it is but the curves, brush strokes and the drawing style which is very identifiable to a person and truly personalized. Learning the way different painters move their hands rendering every drawing ever created unique.

 

Hope to see more on it.

GSoC#7: Global variables are bad.

I couldn't be happier to see this, after eight hours of struggle:


Why did I get stuck? Because I'm used to global variables in C from lower division classes at my university. I always tried to escape the pain of passing by reference or address or value and simply use a global pointer. But when it comes to large code bases and across modules, like the macports one, it's not possible anymore. How often someone passes a pointer by address?

It was a good lesson. The next challenge is to pass this struct to Tcl.

GSoC#5: A few words on Tcl (and an advice!)

After spending a couple of hours reddit-ing and other articles, I found some really interesting insights about Tcl which otherwise you might not never know about a programming language. So the following are some of the facts about Tcl which I found interesting and just stating them here:

To quote Philip Greenspun, as a software developer, you're unlikely to get rich. So you might as well try to get through your life in such a way that you make a difference to the world (like every startup shouts "make the world a better place"). Tcl illustrates one way:
  • make something that is simple enough for almost everyone to understand,
  • give away your source code
  • explain how to "weave" your source code in with other systems
Looks something we can do? Yesss. But do we? Noo.

Tcl rocks! Well, everything IS a string, like in a fundamental way. Just look at the tape from a Turing Machine which is just an infinite mutable string. This is really, really true. Like, when you do something like a for loop, you're basically running a "for" command and passing it four strings.
 for {set x 0} {$x<10} {incr x} {  
   puts "hey"  
 }  
is equivalent to:
 for "set x 0" {$x<10} "incr x" "puts \"hey\""  
:o :o

Numbers and strings being interchangeable actually works. Everything being a string, is damn powerful but takes a while to get into the mindset that you are not just coding the solution up but programming the programming to the solution. 

Oh, and the "uplevel". "uplevel" is a terrifying and baffling feature. It gives you access to the local variables of any function that called you.. Say, whaaat?

Tcl : scripting languages :: C : compiled languages.

 As jaymaj21 comments on reddit, "simple small footprint, least hairy implementation." One of the most efficiently parsed scripting languages, Tcl is simple and way easy to implement. You can just write up your own Tcl interpreter very quick. You can write a Tcl program that pokes around the run-time environment, for example, using "info exists x".

A language that is not powerful by itself can become powerful if a procedure can invoke the interpreter, that is, if a program can write a program and then ask to have it evaluated. In Tcl, you do this by calling eval!

Tcl is more of "Tcl, C Library" because you can access about everything from C in a way that's pleasant to use. 

God was I lucky to get a Tcl project for my GSoC. Finger lickin' good!

GSoC#3: A 'miss'-communication

This happened in the very first week of the coding period of my GSoC. I had things in mind to talk about but they just remained in my mind forever until I received an email that scared me out of my wits and condemned me for not communicating at all for the last ten days. And it was true. 

Failing your evaluations just because you are not communicating properly is like not accepting help from the rescuers but waiting for God to come to rescue you while you're drowning.

Communication is the key. How much did you think about the project over the last week? How much effort did you put into thinking about your proposal? What does your research say? They need to know and you need to tell. It becomes difficult when it's remote.

Think of it as an office internship in some company. Not communicating at all means you go to the office but do not speak at all or engage with anyone and just watch around. Isn't this when we start calling the person weird and alien? People have fought for the freedom of speech and now, you're just being shy. Stupid!

Know how to sell yourself. Research well before making your points but if it takes time, then throw a mail to let the community know that you ARE researching and have the following updates to share. They don't know if you were staring at a blank screen all the time or even existed for that while. Play on your strengths and work on your weak points.

The community is not interested in the project code or the small fixes you make but in your approach to solving larger problems. The bigger things are more interesting to you and to the organization. What is it that you bring to the table? What would you do to improve the project beside the small fixes? Think about how you would spend your time this summer. 

They are interested both in your technical skill, but also your holistic understanding of the project. Ultimately, they will judge you by the thoughtfulness of your proposal.

GSoC is just another way Google provides you to connect with the people around the world. Review each other's code, your mentor's code each day. Think of it as a score for your personal development. You are not given this opportunity to complete one project and just get done. You failed if that's what you plan to do, even if you pass the official evaluations. You are given a life long opportunity to be a part of a community having members from all around the world and all you did was write five hundred lines of code. Ha!

To quote my mentor, "Communication is the foundation of a team. It is as important as any code you ever write. It is unlikely you will focus on building things only for yourself and success in building with and for others will largely depend on your ability to communicate. Always work at refining your communication skills. They will pay off in many dimensions of your life."

There are absolutely no limits to what someone can do! It's just how badly you want it.

Good luck!