All posts by coach

Brute force AI : You don’t train the robots!

Isaac Asimov established three laws for the AI world:

  1. A robot may not injure a human being or, through inaction, allow a human being to come to harm.
  2. A robot must obey orders given to it by human beings except where such orders would conflict with the First Law.
  3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.

While studying A.I. we never questioned the validity of the 3rd law! What is existence — for a robot? Did we ever question the existence of the refrigerator and ever wondered how it *felt* when we are away for a long holiday? How is a robot different from a refrigerator?

Automatic Doors Have Feelings?

For most of us human-kind we are yet to understand consciousness at an individual/self level, forget re-imagining it(ha ha ha ha ha!) for a mechanical thing! And now we come to the moot point of this post – Why on earth are we training the robots?

Allow me to put things in perspective:

We train things where there is scope of learning. Try to picture this: need to learn = knowing you’re lacking something + you value what you want to arrive at!

Can a robot fit into this definition?

Would you ever want to teach your refrigerator to not give ice cold water to the elderly guest coming for the evening?

Would you ever want to teach your television to turn the volume down during the wee hours of the day?

Just because the refrigerator and the television have evolved to the structure of a human body, do we start believing them as humans?

Why should a human body only evoke human feelings of caring/empathy?

As the robots evolve in physical,analytical capabilities, we as humans are bound to develop attachment to them! Its our nature to en-lifen what crosses our path!

The problem comes when the thing starts to get reciprocated and we go into the spiral!

That cannot happen!

We waste precious time thinking/exchanging human feelings with a machine trained & programmed to behave as humans! Already there are dozens of problems to be solved and addressed at the individual level and we bring an inconsequential no-op to the equation!

Bigger / Better Things to figure out?

Human-Kind put to shame at the end of the following video:

For the sake of humanity, we should not do such things! We are trying to train the robot to complete its work, inspite of the human obstructing it to complete its task? I leave the dark consequences of this dare for you to figure out! I will summon The Terminator to my help!

Call this guy now!

To summarize:

  • You don’t train a robot (You are wasting your time if youre doing this)
  • You program a robot (You do it once and forget it for-ever!)
  • You can train a human (You may come across donkeys too!)
  • You cannot program a human (Except self, tread with caution!)

Please don’t code the heart into a machine!

(Brought to you by yet another reflection/inspiration via @ideapreneur)

Learn Exactly How I Improved My Digital Security and Privacy In 2 Days

You have zero privacy anyway, Get over it! – Scott McNealy ~ 1999

What is the real fuss all about?

In real life we have privacy, well kind of, no stranger can enter our houses still? Well think again from an evil strangers perspective, there are layers of security already there that ensure our security:

Systems: Govts,Municipality,Locality,Society,House.

People: Police,Neighbours,House occupants,Passerby,You.

Q: So why is it that the digital security has caused so much trouble?
A: Each and every individual (You) & their digital account (your) is a potential target for the evil stranger!
Here’s the simple math: online world population x online accounts per person == potential virtual estate targets for the evil stranger!
Assuming that a person has a single email account atleast, the online world is as insecure as the real world, add to the mix these accounts are held by anyone from 8+ years to 60+ age with varying degrees of meaning of security in their minds!

Defining the attacks

All attacks can be broadly arranged into these 2 categories!

  1. Illegal entry (un trusted)
    These attacks are generally entrusted to be taken care by the system you are connected to! Say you go a friends place for a dinner; you would not expect to take care about your food from the dacoit running on the streets! You would trust your friends premise would take care of this already, any mischief would be assumed to be an illegal entry actually questioning the system as a whole!
  2. Pretending to be someone else (trusted)
    Its not just people, systems can now also presume our identities and hence are subject to being trusted or not! When this happens, the systems can be abused on behalf of an individual. So it is not just a stranger mis-using your credit card, but worse, a lesser-known stranger!

The Warrior Approach

Every digital identity is under attack, and like in the real world, a responsible citizen keeps their ears and eyes open, in our digital avataar, we ought to think likewise!
There is no fool-proof way to secure your digital identity except taking care of known best practices! You break the rule; you end up paying the price depending on where you committed the mistake!

  1. Choose better passwords
    a)Create/Update and change your existing account passwords from here http://passwordsgenerator.net/b)If you have a number of connected systems and too many passwords to manage, think about getting a password management system(they are not safe too!) or best keep them in an offline system with a ready access!
  2. Never trust a new system
    The least you trust a new system, its fun when it turns out to be totally trustworthy, and if not atleast you don’t end up loosing a fortune!
    Use this mantra in life too, good results recommended! 🙂
  3. Never trust a known system too much!
    Know your limits, you own your body totally, but a flu attack can happen on the best of days uninvited!
    Even your trusted disconnected home system is subject to virus attacks from the chinese-make pen-drive!
  4. You are as secure as the world around us!
    The equation of trusted<->non-trusted keeps getting updated regularly, that keeps the battle on between the evil strangers and the white hats!
  5. Question Everything!
    If you are not finding the answers, start looking for the right ones elsewhere! Don’t take anything for granted, for the but obvious, have an inquisitive mind!

Few years into the future, and these practices might not change, only the systems we interact and correlate with will keep upgrading!

Conclusion

The Question is, how do we trust

Workout Guy

from

Tiffany

Either be a paranoid like Agent J or start following the warrior approach! 🙂

PS:This was written for an opening @ THN.

The Sound Experiment ~ Internet Radio setup

Internet Radio

 

Internet radio is an age old concept, that I first got awed using my nokia e 51(RIP). Getting advt free 24×7 guitar songs was a super surprise! And this week I got the opportunity to help set up the infra for a similar requirement!

Here are the lessons:

Enter Windows:

If you are a windows user, you have lots of quick support setting up a winamp backed shoutcast dsp based streaming solution, right from your desktop! Select a playlist and redirect it to the dsp, Viola: You have your local playlist being streamed to the world to enjoy!

Enter mac:

Coincidently, the winamp software is not available at its full fledged version for anything other than a windows! So the previous solution falls on its face!(You get winamp, but not plugins et al). So you have to try:

1/Broadcast Using This Tool

Screen Shot 2016-01-10 at 2.21.29 pm

The problem with this tool is it cannot hijack a running audio, instead, it can only take an input from a device(like mic). Any 3rd party tool that mocks a running audio into a once coming from a device might make this tool very useful! Its a super trimmed down version for anything broadcast!

2/Nicecast

Screen Shot 2016-01-10 at 2.23.04 pm

Nicecast is good for the naive user, but it has a limitation of noise messing(deliberate overlay of a noise sound) after 60 mins of broadcast. The quality of broadcast with Nicecast was even better as compared to winamp solution and aint it cool they provide you with a url in realtime! Sadly their trial version does not let you play with shoutcast streamings!

Update 3: No need to buy the licence :-(, you can link shoutcast servers from nicecast in their trial!

Enter Linux:

Did not try it, but if you are on a linux system, you have to try liquid soap, for the pure fun of command line!

This is what liquid soap does from the command line — Thats autoDJ mixing powers! Way too cool 🙂 Muse is another option worth checking out on a linux distro!

I did not go full fledged to try out unattended hosting(autoDJ), but there are host of plans/providers for that requirement(links shared below).

Useful links:

Video Tutorial: https://www.youtube.com/watch?v=K_rMNo4tkJc

Get free hosting — http://myradiostream.com/get-started/

Another free hosting — http://www.caster.fm/

Not India specific(free autoDJ) — http://free-shoutcast.com/

Free/Small AutoDJ account — https://shoutca.st/

THE STREAMING SOFTWARE — https://www.dyne.org/software/muse/

THE STREAMING COMMANDLINE — http://liquidsoap.fm/index.html

Streaming options — http://blog.wavestreaming.com/5-best-client-broadcasters-to-stream-live/

Various baud rate files — https://www.fastserv.com/kb/article/mp3_bitrate_selection_and_samples/

Talk on baud rates — http://blog.codinghorror.com/the-great-mp3-bitrate-experiment/ and http://sound.stackexchange.com/questions/26222/are-there-any-audible-differences-between-192-and-320-kbit-s-mp3-files

I wish we had more native radio streaming service providers on the web (esp India), why that is not the case maybe due to radio not being accepted as a medium people prefer to hear!No doubt it is the one with max reach!

Also basic things like, why a low encoded audio only does not play well on one stream and a high encoded music play flawlessly on the same stream -Are questions that still bewilder me to an extent! Time to pick up the baud rate/bit rate/encoding/decoding concepts and revise!

Any sound engineer around!?(pun intended!) 😛

Update: The super fast audio hiccup, could be due to chipmunk effect!

Update 2: This experiment is not complete without referencing to podcasts! And here is the magic portion! 🙂

Further monetizing the audio is also an option which shoutcast provide by stealing 2 mins of your stream time and plugging in their advts! IMO, with things that go straight from the ear to the heart, advts should be avoided! Even if its the extreme nuisance of hard rock music or the sound of rain drops & thunder and anything in between! A way better option is get the subscription based model upfront(maybe with a trial of a week or two) and then people choose to keep or trash!? 😀 🙄 ??

Update 4:

AND THE WINNER IS: http://shoutca.st !

Reason:

  1. They give you 50 mb free auto dj.
  2. They give you servers in France(most reliable country in tech!)
  3. They run liquid soap underneath! Yay!
  4. Their solution is cross-platform.(read:cloud)
  5. Their interface is typical of a french mindset! 😛
  6. You can switch to live telecast whenever you want!
  7. They offer icecast and shoutcast v2!

Take my word for it, go for it, for a truely awesome streamed internet radio( minus podcasts) setup solution!

Social Media Marketing of things!

 

As the year 2015 comes to end, high time to board the social marketing bandwagon!(Better late than never!).

With BA out of the woods, and desperately looking for people to start using it! :-/, @ideapreneur suggested to try the FB thing and get the app to be downloaded via FB advt!(superb idea!) :-), On With The Implementation!!

So we had 3 contenders: FB/Google/Twitter as usual, as max footfall is via these 3 mediums! I will be sharing how I felt while using these mediums to reach out the potential audiences for the app!

1/Audience filtering:

Winner: FB

Tw: Had exactly 300 people interested in biking, This made Tw go out of the competetion way too early!

Gg: No way to find the potential audience, and there is no concept called interest, only keywords(way too year 2000 style)

FB: yay! tune your parameters location/interest/demographics and you get a potential reach! Way cool feature — actually won right stragihtaway there!

2/Ease of usage

Winner: None(maybe Gg)

FB: It took 3 weeks to get a hang of their systems! Their weird terminology of campaign/adverts/adverts set(yuck!) had me stuck unnecessarily for 3 days, as an advert in an advert set was OFF! Also their constraint that an image cannot have more than 20% text also had me waste 3 days getting them to approve/disapprove my advts. Oh and they pulled away 2k bucks in a day for an app install campaign! :-/

Gg: For a new comer not getting footfall on google, seems like their system was broken! That was a problem!Their system is perfectly reflecting how a mainframe of advts should look like! :-D(ha ha!). One super feature was me giving them a link to my site and they creating an advt out of it!WOW Take a look what they did here. This made them win by a small margain!

 

3/Footfall

Winner: FB

Gg: Well maybe the websites are going out of fashion! A great reach but people not interested in the advt at all! more than 50% CPC as compared to FB, and the number seemed small!

FB: Does this need an explanation? Most of the virtual world still visits FB. Plain. Simple.Get it.

 

So, this feat is captured, WHY AREN’T PEOPLE USING THE APP STILL? 😛

 

Bike Assist is out!

Making Bike Rides ~ a paradise!
Bike Assist

Bike Assist is out and generally available(fully loaded!)

Here’s a download of all versions:

1/Standard/Free Version

2/Premium Version(@ INR 29/mo)

3/Maps(@ INR 19/mo)

4/Heartbeat+(@ INR 24/mo)

Heres the feature details:

compare4And now to the special features:

1/Maps: Going wayword from our punchline(Maps are boring!), we did realize that when you have a flat tyre, Maps are not that boring, so we have provided with the integration of maps for all spots at a small premium!

2/Heartbeat: The most exciting features of this app!Say you are planning a bike ride and your loved ones need to stay update about your whereabout? Now it wont be fun they calling you all the time?Enter HEARTBEAT: Pin your location whenever you want, to your loved one! If you really like it handsfree, we have provided a mechanism where for a scheduled time(4/6/8 hours), your location will be updated and your loved ones can take a look at that link(updated every 15 mins)! Aint that cool! 🙂

Coming back to BA, heres the link to the app:
Android app on Google Play

If you wish to send us best wishes, you can do so at facebook:

Please go ahead and use the app and share your experience!

Securing your AWS instance!

A daunting task of getting the things secured in the app! Here’s a plethora of links that can help anyone lost/looking to get it done!

  • Cant trust https? Well, roll out your own, AT YOUR OWN RISK!(A must for even https GET calls)
    http://dacrazycoder.blogspot.in/2013/09/encrypt-url-parameters-using-aes-in.html
  • openssl | Getting started with the certificate
    https://www.digitalocean.com/community/tutorials/how-to-install-an-ssl-certificate-from-a-commercial-certificate-authority
  • Look here if nothing works!
    http://www.thefarmdigital.com/blog/technology/how-do-i-setup-ssl-on-aws-elactic-load-balancerelb/
  • FF issue(double check in the browser too!)?
    https://sslanalyzer.comodoca.com/
  • AWS docs(perfect example of information overload)
    http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-elb.html
    http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.elb.html
    http://serverfault.com/questions/356598/why-cant-i-reach-my-amazon-ec2-instance-via-its-elastic-ip-address
    http://serverfault.com/questions/238976/cname-to-aws-public-dns
    http://pushentertainment.com/rds-connections-by-instance-type/(DB)
  • Testing what you have
    http://mxtoolbox.com/productinfo/domainhealth
    https://www.sslshopper.com/ssl-checker.html
    https://sslanalyzer.comodoca.com/
  • Small things(Hacks!)
    http://stackoverflow.com/questions/22290821/using-a-wildcard-ssl-with-a-cname-pointing-to-ec2-instance
    http://passwordsgenerator.net/

Dont forget, if you have a front controller for your aws, you need to apply the certificates there also!

And finally once all is set up turn off your http listeners for port 80! 🙂

And here’s a link to end the atrocities of the monopoly of the so called CA’s : https://letsencrypt.org/ 😀

DejaVu : Web Services!

For the un-initiated, I am working on my lesser liked topics in the programming world, JS and WS!

I had recently started appreciating the WS without XML/Annotations a few weeks back, but to my surprise, the XFire implementation is no more supported in Spring 3.x hence I had to fall back on XML and Annotations.

I could come up with a working example of contract first WS development from here, and I was happy to see things working as expected, except for the inherent pain of seeing and using XML/Annotations.

This made me re-visit my understanding of whether to use java-first or wsdl-first approach for development.

I was initially a supporter of java-first simply due to my dis-liking for XML, now it seems a wsdl-first approach can keep the concentration of implementation towards the data structure of the messages that go to-and-fro.

That said, if I develop a java-first implementation, and give the 3rd party implementation team the link to the wsdl, does the 3rd party implementor stand to loose anything?

Either way’s even if they are using something other than java to consume the services, they have to wrap the response as per their conveneince, the only tradeoff that I seem to have is the structure of the wsdl message is not the fundamental change item, but the java method arguments become the items that define/control the change.

The only flexibility that I might be loosing here is the power of functional programming language, as-in imagine if a functional programmer implements a wsdl as per my current understanding, I question, does that programmers changing of the wsdl based on the arguments that come and go, affect(ease/pains) my implementation?

To conclude, do I stand to loose anything if I *still* go the java-first implementation way?

Your thoughts?

~rohit.

Debugging JSP Request/Session Variable

Of all times debugging jsp code is the most challenging of all times to me that anything else.

And for that, I came across the linked jsp and the following code snippet in the footer jsp of the application:


      <%@include file="/WEB-INF/jsp/debug_session.jsp"%>

keep the debug_session.jsp as per the path defined in the above snippet.
To check all request & response variable while developing, just update the current url as:

  
http://localhost:8080/context-path/login.jsp?debug=jsp

And you can easily check all variable without trying to search them in the request object on your IDE, while debugging!

Here is the debug_session.jsp

~rohit.

Requirements Tracking- Yet Another Format!

Couple of days back at work, I got my first opportunity to document the requirements for a particular moderation flow.As a practice we document everything in microsoft project management tool(read: ms word).

And the pain of tracking the changes, without review/comments is unacceptable!

Hence with the motivation set in, this is the template that I could come up after a *lot* of thinking:

As a I want to do … So that… Only If… My action affects…

and here’s an instance of an entry derived from that template:

moderator See new artefacts  entered by users I can validate the contents. There are new artefacts available in the system. Displaying the artefacts with ability to go to next artefact and/or approve/disapprove them.

I have modified the actual text that was prepared for generality and not keeping office work in public!

Incase you have not already guessed, this instance deals with viewing artefacts for moderation.

While preparing this template, I was not cent percent aware of the domain that I was dealing with and also, I was new to this module, maybe that can work in favour of most people in similar situation!

What do you think? Does this template gives you the ability to cover all/most scenarios in your development story?

Feedback welcome!

~rohit.