I have got my skirt blinking!

I have been thinking of doing a project in wearable electronics. Adding lights that blink on a skirt when I move seemed a good one to start. I had a white skirt lying in my cupboard. I got a Flora board, one Accelerometer/Compass Sensor and some LED Sequins from Adafruit. There are a few distributors of Adafruit in India. I got all of my stuffs required for this project from ProtoCentral. I also got conductible thread, a 3.7V Lithium Ion battery and a Adafruit Lipo charger to charge the battery from any USB port.

Before any stitching, I tested the board and the Accelerometer using jumper wires and a breadboard. I got an initial version of the code working too where the Accelerometer was sending the x, y and z values on the Serial Monitor in the Arduino IDE.

I stitched my circuit on the inner lining of the skirt. Here’s how the circuit looks.

Flora with the AccelerometerLED Sequins



Here’s the github link to the code that I uploaded on the board. I took the code mentioned on the Adafruit’s Sparkle Skirt manual, but I had to make some changes since I was using LED Sequins instead of Neo-Pixels. LED Sequins are much cheaper than the Neo-Pixels and I didn’t need the brightness and functionalities of Neo-Pixels. Also I adjusted the delay values and the move threshold values to make my circuit work.

And, after a long spell of procrastination and some more procrastination, I made the initial version. Need to add more sequins to this to make the lights more visible. Here’s how the initial version looks like.

blinking skirt v1 from Satabdi Das on Vimeo.

Some learnings which are scattered in many videos and blogs on the adafruit website

1. You can not put more than 5 Sequins in parallel on a single Flora pin.
2. But if you use Neo-Pixels, you can put as many because they are chainable.
3. For 1 to 5 New-Pixels, use 2 Ply Stainless conductive thread. For more than 5 Neo-Pixels, use 3 Ply Stainless conductive thread. For more than 20, you should use silicone covered wire.

Technically Speaking Goal in 2016

I have been a silent and pretty much a passive follower of Technically Speaking since the time they started. If you are wondering what’s that – it’s an email digest to help and inspire people to speak at technical conferences. You can either sign up or follow them on Twitter.

Lately I realized that I actually like public speaking and sharing knowledge after I spoke at a couple of training sessions at my office. I have been thinking of giving public speaking a shot since then, but always got stuck at the questions of –

What? How? and Where?

The recent digest from Cate and Chiu Ki nudged me a little to do something about it. It looks like a perfect opportunity for me to set my first public speaking goal and there’s not many of them. Here it is –

  • Give a talk at a technical conference

Creating my first website on a Sunday evening

Yes! It was as easy was that! Although it took me one year to think and ponder upon the idea of creating a website, when I got down to writing one it took me one Sunday evening to create a static website as a birthday present for my husband. Here’s the link – http://kakkeshwar.net/

I used bootstrap as is eminently visible from the page. And CodeAcademy helped with me a crash course on basics of html and css.

womENcourage 2015 at Uppsala

womENcourage2015
womENcourage2015

I attended womENcourage2015 at Uppsala University last month. First, I thank Google for supporting me to attend this conference. It’s a wonderful program by Google where they give women in STEM grants for attending technical conferences. Those who wish to apply please visit this link.

Prototyping wearable electronics workshop
Prototyping wearable electronics workshop

The conference started with a Hackathon organized by Intel and Microsoft. It was my first Hackathon at prototyping with micro-controllers. I had an idea of making a smart accessibility device. A few people became interested in my idea and we modified the plan a little bit. Our team won the third prize at the Hackathon. It got some publicity at a local Swedish daily too!

The main conference was held in the main university campus. Many sessions took place at the magnificent main hall of which you see the picture above. The conference was attended by women from many countries, most of them studying in Europe.

Here is a list of some of the sessions I found very interesting
1. “On Grit and Being a Token Figure” by Åsa Cajander. Do watch it from 16:20 of the video of day two
2. Computing for Humans by Vicki Hanson
3. Panel discussion on Out of the Ordinary Jobs After a CS Degree

The video recordings can be found here –
1. Day one
2. Day two

Overall, it was a very nice experience to see so many women studying, researching and working in the field of Computing. It was a great experience learning from them and knowing about them a little more.

What organizing tech talks at the office taught me

Around June 2014, I started organizing technical talks at my office. The organization I work for is not small and we do have a technical council that organizes trainings and an annual coding competition. The quality of many of the trainings are good. I personally did a series of trainings on advanced algorithms and data structures by Dr. Naveen Garg and it was very very good.

But, I realized we were missing something. The trainings planned by a central team was top-down. It should also be supplemented with bottom-up employee driven informal trainings and technical talks. We write verification tools for the semiconductor industries. Domain knowledge is a very important part of our job. But we essentially build software. If the foundation of software is weak, then in my opinion, even a brilliant domain specific idea can not produce a better product which can be reliably used by our customers. And towards that goal, I thought we should organize more informal tech-talks.

I approached my manager and his manager and both of them were interested. I started off with a video screening of “Insecure coding in C and C++” by Olve Maudal. I thought it would be a super hit since I loved watching it. But it was not! People preferred a more interactive technical session.

So far, in the last six months I organized 5 tech-talks which is far less than what I thought I would do. But I am glad that I got at least 4 people agreeing to present on different topics. What I learned from organizing the tech-talks are –
1. Organizing them on your own takes a little effort but it is definitely a good experience.
2. A technical talk should not exceed 1 hour. People do not have more than one hour to spend on a topic which may not align with their work. And there should be at least 15 minutes of discussion.
3. A technical talk should never happen on Friday post-lunch as people tend to leave early on that day.
4. A technical talk should not focus only on the domain in which we work, but also on other domains too. We had a technical talk on “k-means based document clustering” and it gave us a few ideas which can be applied to our work.

Women in tech industry in India

After an year of starting Women in Free Software and Culture in India, I created a new group named Women in Tech Industry in India on Facebook. The trigger point was GHC India and Adacamp Bangalore last year.

I had thought of creating a platform for women working in the IT industry in India to network with each other when I started WFS-India. But that group was purely aimed at encouraging more women to start using and contributing to FLOSS. Attending both GHC and Adacamp made me convinced how important it is for women in tech to connect with and motivate each other.

Articles like this are proofs that we need such groups. If you happen to read this post and are a person who identifies as a woman please feel free to join the group if you are on the Facebook.

The elusive memory error

It involved a crash with 32 bit optimized build of an executable which was running fine with 32 bit or 64 bit debug build and even with 64 bit optimized build. No crash with debug build, hence no debug symbols! I started printing out logs “inside this function : All looking good”. This exercise led me to the culprit function. Nothing outrageous was happening inside this function. A few more printf’s led me to the line where the crash occurred.

void crashy_func()
{
...
...
...
my_list *pList = NULL;
initialize_list (&pList);

my_container->list = pList;

if (cond)
call_some_func(my_container);
else
call_some_other_func(my_container);

std::cout << "Size of list " << size ; // And here it crashed
...
...
...
}

Points to be noted here –
1. Valgrind didn’t show any memory error in this area of code.
2. Neither call_some_func() nor call_some_other_func() freed my_container->list. In fact they didn’t make any change at all to my_container->list.
3. At the point of crash, the value of pList and my_container->list was different. While my_container->list had the same value it was assigned, the memory address pointed to by pList was showing some junk value. Conclusion – pList got corrupt somewhere. But how could it be possible?

Initially, my guess was that the compiler optimized away the local variable pList. If that is the cause, then why didn’t 64 bit optimized build fail? Or how can such a trivial bug happen in gcc? Therefore it was an utterly wrong guess.

Anyway, I made a temporary fix by replacing the crashing line with –
std::cout << "Size of list " << list->size ; // And here it stopped crashing.

Only it was not a fix exactly. Some memory address got corrupt and I avoided accessing it by accessing some other memory address containing the same value.

So how did I find out the problem?

I attached to gdb an optimized build which was not stripped off symbols. gdb has a handy command disassemble which I used to ‘diassemble’ crashy_func().

The native code displayed by the disassemble command showed that the compiler inlined call_some_func(). I could get the memory location at which variable pList‘s value was stored. You can locate it in the native code by looking for nearby function calls which the compiler didn’t optimize. And then try to correspond the native code with actual C/C++ code. There is no formula to do this but only comparing the C/C++ code and the native code and trying to figure out which lines of native code correspond to which line in C/C++ code are the only ways.

But this didn’t tell me how the variable pList got corrupt. What I needed was a watch on the memory location that stored the pointer pList. I ran the executable in gdb and around the line initialize_list (&pList); I started printing the native code.

The command I used –

x /10i $pc <-- This prints next 10 instructions.

To clarify things,
pList is a pointer to an address where the list is stored.
my_container->list points to the memory location where the field list of the struct my_container is stored.

For the line "my_container->list = pList;", there would be instructions to move the value from one register to another. One of those registers would contain the memory address at which the list pointed to by the pointer pList is stored.

Once I got the memory address that stored the pointer pList, a watch on that memory address revealed that a static buffer overflow caused the corruption. It was done by an sprintf();

The bottom line is if you get a spooky crash and do not have a debug build or can not reproduce it in a debug build, do not panic. What the whole experience taught me was – make use of gdb as much as possible. Here's a list of a few handy gdb commands.

IRC planning meeting to promote FOSS among women in India

Who should join?
If you are enthusiastic about FOSS and sometimes/always wondering why there are so few women in India contributing/working in FOSS, please do join. People in the meeting would love to hear your ideas and suggestions to include more women in FOSS
If you are a woman and think that women in software should come together to address the common issues faced by them, please do join.

What is the agenda?
None decided. This is our first meeting and we will share our views and see what can be done. Roughly the discussion might be around –

  • why and if at all do we need a group to promote FOSS among women in India,
  • how we can improve networking among women in software in India,
  • how we can unite to address common issues faced by women in technology in India,
  • how we can help each other to build skills, expertise and grow professionally and personally
  • if we can organize an event (something on the line of adacamp – (I really love the idea)) in India.
  • anything that you wish to bring up to help the cause.

When and where is the meeting taking place?
When – Monday 29 April 2013 at 9pm IST (UTC+05:30)
Where – #wfs-india at irc.freenode.net

A list of similar groups/events happening worldwide
The Ada Initiative
GRACE HOPPER
Girls in Tech London
and many more …

How to get started in FOSS

I’ve started contributing to FOSS projects since the last month and I’ve already found myself telling two newbies how to get started in FOSS. Although I love to give “gyans” and explain stuff to people, I thought here’s a good opportunity to write on this topic a post as comprehensive as my limited ability and knowledge allows me to.

Before anything, let me first tell you how I got started. I was just done with writing my mains for the UPSC Civil Services exam in October 2012 and I was thinking what to do next now that my 3 year long journey as an UPSC aspirant just got to an end. I decided to try out software again since that’s what I was doing before starting my preparation for UPSC.
Now I’ve been using Ubuntu at home since around 2007 and through out my 4 year long career I’ve worked on Linux environment. I’ve also seen and known a few open source enthusiasts and serious contributors. And husband being a little geeky-software-guy helped me to join the FOSS bandwagon easily. Quite fortuitously around that time, Gnome foundation was offering internships to women to promote women in computing and particularly FOSS. I got through. That’s enough about my history and let me now help you with what you’ve come to read at this post. How do you start contributing to the FOSS projects? Well, there are many ways –

First, get a open source OS at your home computer and get rid of that nasty little thing named after one of those things that you see in every home. Then join various Linux User Groups in your college, city or state. Many of them have IRC channels, join them as well. Lurk around in those channels. Many a times you get posts asking for volunteers.

I got to know about the following projects while applying to Gnome OPW
1. Gnome
2. Subversion
3. Wikimedia
4. Tor

There are others as well –
1. Mozilla
2. Openhatch

If you are a student you might consider Google Summer of Code

My list is not exhaustive and it can not be so because there are just so many open source projects which need contributors. I’ve shared the above list because that’s how I started. Along with the sites mentioned above, I also visited many other open source projects which I used or would have liked to use.

Therefore if you are waiting to get your hands wet in some good work or just feel that free and open source software is the right way to go to bring some equality in this otherwise unequal world, then do not wait for someone to give you work. Start browsing though FOSS projects, use them, find bugs in them and start fixing them.

And one last thing to say before I end my long post – “help will always be given at Hogwarts, for those who ask for it” – just replace Hogwarts with FOSS community. Be polite, ask around for help. Some of the folks are actually nice, you know, even though they hide behind geeky-unfathomable-nicks! 🙂