Tag Archives: problem

Rant : Covid-19 vs Me(The software developer)

Long time, no See folks!

Writing after a long time, a discussion with @SoftwareGod, triggered this blog post!

(I am in self induced inertia!)

So the discussion was about we(s/w devs) contributing to the drug discovery hackathon for Covid-19.

Why I choose not to join:

1/Hackathon is open sourced, everything else is IPR‘ed.

2/No “Getting started with biological virus” guide I could find?

3/What are our R&D scientists doing in virus labs?

4/IMO, get a super computer in place for running simulations, although the mobiles and laptops are a lot powerful today, I am sure super computers run on petaBytes/milliseconds speeds!

So, that done, I recalled, hey! I had once developed an anti-virus programme, in Visual Basic(I had super-less love for M$ at that time).

Going back in that time….

I was forced to learn VB, and I was making faces inside of me, like why??

Coincidentally during that time, my system was hit by HTML RedLof.A virus, it was the era of floppy exchanges, usb drives were not so common.

So, this novel idea sprung up in me, why not cure poison with poison (Hu Ha Ha Ha…. Hu Ha Ha Ha….) 😀

So my next task was writing a cure for the virus(not vaccine) in my least liked languages M$ VB.

Looking back, this was the algo, which may/maynot be mapped to biological virus.

1/The first thing, I noticed in my system was , the free hard disc space started reducing.

{identify unique or distinguishing symptoms}

2/I could not understand the reason first why. but on closer analysis, I saw my recently modified files being htm,html where the size increased by a fixed amount.

{check inflammatory markers, or the first response body gives when attacked by virus}

3/On opening those files, at the end of the source code, I saw alien code of the virus and its replication.

{Once infected area found, extract and analyze; this is very domain specific}

4/The virus was replicating and affecting html,htm files, other infected extensions were: jsp and vbs.

{understand how virus entered the system, stop that first}

So most probably an infected html or vbs file kept in an already-infected floppy, affected my system.

5/Now that the pattern was identified, I simply wrote VB program, to

a)Scan whole computer for defined extensions files

{in covid-19: various proteins}

b)For each such file, reg-ex the starting of the alien code and end

{find a way to delink the alien protein}

c)Delete that piece of the code

{Kill Kill Kill}

d)Save the file.

{replenish that part, shower with newer safe proteins}

I confirmed the same via anti-virus programmes as:

1/Ran the 3rd party anti-virus : Infection NOT found

2/Infected my system with the virus

3/Ran the 3rd party anti-virus : Infection found

4/Executed my VB program

5/Ran the 3rd party anti-virus : Infection NOT found

This ways my system got rid of the virus completely.

Coming back to biological viruses, I think we can take help from Symantec,F-Secure and such “anti-virus” software making companies, because they have studied so much more patterns of viruses, and that can be employed to faster Drug Discovery!

Thanks for reading! 🙂

Eclipse not auto-configuring/auto-importing a Git mavenized project

I was trying to setup a maven project in eclipse via GIT. I had hoped, it will auto import the project into eclipse, but for some reason that did not happen.

 

This is what was done as a workaround:

Step:1 Checkout your repository in your system

File->import->Git->Project from Git->Clone URI->Enter Git Repository Details

Select Destination where you wanted to store your Git Repository

Step:2 Import your Project into Eclipse

File->import->maven->install or deploy an artifact to a Maven Repository

Once these steps are done, The project is browsable in eclipse!

Some Helpful Git Commands for the commandline:

git init — Initialize your directory with git.

git add FILE and git checkout — FILE To stage/unstage a file

git commit— To save your changes. This commit will be local

git stash and git stash pop — Stashes are back

git reset HEAD –hard Revert all your local changes

git log— Access all the history in the repository

git rebase –You can squash all the commits! (one should be carefull with this one)

git branch –You can create local branches,But keep the history linear

Hope this workaround and the commands are useful to a new user.

What Elon Musk can learn from Java App/Cloud Deployments!

I had an unproductive day yesterday!

I did nothing, but slept through most of the day. And then late night this next challenge of deploying the hush-hush java app over the cloud started to bother me.(afterall it was not a totally unproductive day, thinking wise!)

And then, flash back to a few days, where comparisons were made, what I am doing (javascript ehew!) and what one of the current top living inspiration in the current world Elon Musk is doing, and then I went into sad slumber!

Then yesterday happened, and then it clicked:: we Java devs(web ones, not hard core jdk ones) are orchestrating everything in lifecycle of what Elon Musk is trying to do!

Here is the analogy(it can be extended wonderfully!):

  1. The WAR(Web ARchieve)(sorry, I am old fashioned) is like the unmanned space ship.
  2. The dev JVM is like simulated Mars environment.
  3. The cloud is the SPACE where the bits travel to-and-fro in form of data/packets.
  4. The machine IP Address is like the lat/long of where you want to deploy.

So my current app is in its final integraton phase(hush-hush…) and I am trying to accomplish Slide Driven Development.(nice term!).

Slice Driven Development :: A development approach where a feature/flow is shipped to staging environment as soon as it becomes usable.

Currently I(with @explorer) are trying to integrate all features/flow of the hush-hush app, While I am totally unsure/unaware how it will behave when deployed on staging/production environment. Therefore, I had come up with this approach :: The momemt a feature becomes bug-discoverable, it ought be shipped so that:

  1. Move to the next flow..
  2. Bugs can be quashed..
  3. (most imp)Our path of going from dev–>staging–>production for any feature should be seamless and smooth like  skating on butter!

And then, a Eureka moment happened!! And this blog post came about!

Your Takeaway: If you are on a team working with Elon Musk(or anyone trying to transport stuff from place X to place Y, in an unsure environment), you can leverage from the experience of thousand if not millions of deployments of web java developers trying to deploy WAR file formats from local dev JVM to production JVM.

We know the nuances of this lifecycle!

It might save you some time! 🙂

The Slow Moving Manifesto!

If you are being tailgated, we recommend you follow this approach to come out of that situation!

Go Absolutely Slow!

YES, surprisingly it works out just fine!

Purpose: To know who is tail-gating you AND Why?

How it works?

  • If the vehicle following you sees you slowing down, they will have no choice to speed up (which means they were not following you) or look-you-in-the-eye. (either ways, the problem is solved!)

Benefits of slowing down

  1. By slowing down, you opened an opportunity to talk.. Human Connect!
  2. By slowing down, maybe you can have a running conversation, you are driving + talking(giving direction who knows). Saves time!
  3. By slowing down, you saved lifes! No stats but still true!
  4. By slowing down, You enjoy the road-side scenary. (remember enjoy the journey not just the destination!)
  5. By slowing down, You literally look the problem in the eye than running away from it.

There goes, we have the Slow Moving Manifesto!

Credits: Smita, Rachit + (KennyG played in our neighbouring park @ 1000 hrs) 🙂

Rebuttal | Top 9 ethical issues in artificial intelligence (www.weforum.org)

Please read this before understanding the context of this post.

They are asking silly questions, that need to be nullified.

1. Unemployment. What happens after the end of jobs?

It has been established very strongly that weak minds fear technological advancement. If you are not ready to upgrade yourself, you become stagnant in your current work. So overruled! We should have one objective: advancement in technology should not be subject to professions unless it in unethical. Ask the truck drivers, about the ease of remote car locking( I am sure they are using it). Why did they not protest for locksmiths? Its a statement to create unnecessary tensions.

2. Inequality. How do we distribute the wealth created by machines?

Why? If you stumble across a pot of gold in AI for by providing some solution, you choose how you spend the money you own. Did anyone ask how to distribute money <some-business-tycoon> earned from their business? Such events occur and machines do not own wealth, there’s no inequality.What’s this question for?

3. Humanity. How do machines affect our behaviour and interaction?

We might need to start training everyone on this front. Already we(atleast I) find myself struggling in my behaviors and interactions with fellow humans, another human like AI, with no heart and consciousness, well you are only going to make things complicated. Hence the need for training. Related post here.

4. Artificial stupidity. How can we guard against mistakes?

Remember what Einstein said about Stupidity? Well we should solve/address things that are solvable and not something unpredictable. Can we program stupidity? I think we are still far from it.(stupid != foolish)

5. Racist robots. How do we eliminate AI bias?

Why do we put racist behavior inside AI first? Fix the root, you get a better fruit. See #7 resolution for more on this.

6. Security. How do we keep AI safe from adversaries?

Propaganda. Read a resolution for it in my earlier post here.

7. Evil genies. How do we protect against unintended consequences?

Simply have an insurance policy for AI: Any person/entity who produces an AI product, will be held responsible for any consequences coming from it. And that ownership will be lifetime. Not conditional or not lease based. I do not know why have we forgotten Newton’s 3rd law!

8. Singularity. How do we stay in control of a complex intelligent system?

Two examples come to mind: Alphabet and UN. One is perfectly managed complex system(Alphabet) and the other is a hopeless mess of crap(UN). Learn from Alphabet. I doubt if there is any other convincing organization really working for us humans, genuinely.

9. Robot rights. How do we define the humane treatment of AI?

I am surprised this question is being raised by heartless minds. Rights are for entities that have life(insects,plants,animals,humans qualify). Have we arrived at a state where human rights are protected on whole planet forget about the others? Unless that state is not arrived at, it is unfair to ask for something called robot rights. Did we ask for TV’s rights and camera’s rights and toasters rights? Referencing this post here again.

Hope this takes the thought process in a better direction.

When the internet was crippled to a halt! ~ The dDos attack – A Post Mortem

The Problem

Couple of days back, 21-October-2016 everyone connected on the web experienced sluggishness in connecting to the normal sites and saw obstruction in their regular works.

The scenario can be visually described as follows:

DDOS Attack Explained
DDOS Attack Explained

Incase you might be wondering why this attack happened now, the internet is way mature, why can’t it protect itself from such attacks?

Well, then do read on…

The Players

From an ideal perspective the players in the attack are listed:

  1. Users of the web (us) (attackers and victims)
  2. ISP’s (medium through which attack was carried out)
  3. Device Manufacturers (Things, which got compromised — zombies)
  4. Regulatory Organizations (They are mostly sleeping or doing other important silly stuff, lets leave them out of this discussion)

The Premise

Let us look at those questions asked earlier and more:

What is dDos?

It stands for distributed Denial of Service. Consider your regular pesky thing that you have to do and can’t live without?(siblings,kids,neighbours.. anyhuman thing). They come nagging to you, you can handle it but maybe 10 requests in a day a max! The 11th request from that pesky thing will get a denial of service response!(simply a No!)

Now,Imagine yourself at a play house. And you are already having a minor headache(it was Friday, everyone was in the mood to relax). Multiply your single pesky thing with say 10, you are bombarded with pesky request from everywhere, what will happen to you? You might handle say 20 requests at that moment, looking at the situation, but a time will come soon where you will get exhausted and simply stop responding to important requests of like : open the door, and you are standing still!

You just got dDos’ed 🙂

Can you explain it in layman’s terms?

Here is the wikipedia entry.

I still did not get it..

See this:

Why this attack happened now?

It was waiting to happen, its like too many cooks, spoil the broth kinda scenario. Lot of unpatched/sloppy devices connected to the internet working for you and they all had a common zombie entry point, that simply got activated!

The internet is way mature, why can’t it protect itself from such attacks?

I am sure there are some orgn that were actually fighting this menace! Imagine a hospital unable to get reports of a patient in critical condition!So I am pretty sure what got reported and what actually got fixed and treated is somewhat different. So the internet is not at all mature, we are still not ready to have our life depend on it, our livelihood might depend on it but not life!So some orgn might be involved (even now) preventing many such attacks to keep the internet working, and some sleeping regulations might have also protected and saved us from a much more severe attack!

The rules are pretty simple, everyone is united on this matter and no one likes a dDos attack to happen! It actually interrupts normal/perceived flow of life on a day-to-day basis.

So basically its the attackers who (misued?) a compromised device and affected the network. Its pretty clear, there is something that needs to be fixed/controlled in the wild. And its not impossible..

Onto the solution then, shall we proceed?

The Solution

Two parts solution can be proposed:

  1. Regulation. In an ideal world, regulation is already in place and device manufacturers are supposed to follow them and hence they are able to sell their products. So something stronger needs to be put in place for regulation. Say if a device is an IoT kinda device, then as per regulation it should be allowed to use 5% of the bandwidth. If its a phone or a computer, then it will not have such a restriction, or maybe it can have!
  2. ISP Level Quota Software. ISP’s would want to pitch in this idea, where a custom configuration software would be installed at per user site and there based on the MAC address the bandwidth quotas can be defined. Say you got a new IoT device for your home, you will get to configure and set a max bandwidth that device is allowed to consume on your home network.

Thoughts?

The messaging wars are at its peak!

WhatsApp deviated from their no-advt policy just at the start of this month. That triggered everyone to start searching for alternatives to WhatsApp’s addiction!

Here is what I could find (and wanted to try) since then:

1/ Amity : They claim themselves to be the Interactive Messaging app, and they hail from Australia. Seems very exciting!

Here is an introductory video too:

2/Allo : This is the recently launched chatbot from Google! I think this will win the race hands-down! Their AI is very slick and you maybe even (if I say so) more human than Siri! (what am I saying?)

Although there are other non-Zuckerberg players like: Telegram,Viber,Hike,WeChat,Skype But now the segmentation has started to take its evil form in! With WhatsApp you never needed to think if the other person might or might not have the software!Kudoz to them for launching the app for Symbian S60 platform!! But ever since FB took over, just as with the deviation from no-advt policy, who knows what level of invasion might creep in! :-/ Hence my motivation to stay away from any Zuck platform!

Coming to my current phone: Jolla: Sadly only whatsapp (dislike now) and telegram seem to work via ported android apps on Sailfish OS. I wanted to try out amity app and allo on Jolla but there’s a bit of an exercise involved over there to get things working!

Further, here @RL, we had  thought of creating a messaging app ourselves couple of years ago! We thought of calling it ‘Z.(shout out to deamypixel@RL) It was build around the premise of adding a ‘Z to every greeting.

say: good morning, ‘Z says: good morningz

say hi, ‘Z says: hiz!

say bye, ‘Z says: byez!

Maybe when the right opportunity comes we will give a shot at churning this one out! Any collaborators?

Until then the search for the the whatsapp alternative is still on!

Sculptor’s Log

There was once a log, ready to have a meeting with the Sculptor, getting ready for the grind!
Casually it approached the scene, not knowing what is to happen to it next,
Waiting to see who/what is the Sculptor is and what can he do for it?
Seeing a couple of wasted logs around the scene, it could not resist but ask their state!
They said in chorus – “One word, Do as the sculptor says” as they were tossed out of the view.
“Ahh, What could the Sculptor ask me to do” was the only thought pacing up and down the log’s mind!

Log being chiseled!

And the moment of the log’s meeting arrived…
Placed in the hands of the Sculptor, the log could not giggle profusely!
And then.. Bam! Sculptor’s chisel tore apart a big chunk from the log.
And the log screamed to the Sculptor, “What are you doing, please stop”
The Sculptor stopped, and asked whether the this log did not have a chatter with other logs?
The log said, “They said only-to listen to you,they did not tell you’ll make me undergo this chisel”
The Sculptor looked clueless, and the log asked itself to be excused.

After some time of pondering…
The log thought of going through the process as one strike a day…
And the deal was made…
Days,Weeks,Months passed and the log took the blow daily and frowned and complained..
And then one fine day, the Sculptor said to the log, I’m done with you.
And then the sculpted-log was moved to a different place — not knowing where and for what, it cooperated!

Being sculpted

A few days later…
The log was placed at a higher platform, and then by chance it got to see itself in a mirror!
And it could not believe what it could see — A beautiful deity crossed its sight.
Not believing that was It, the log waited for another such day and then the belief was confirmed.

Outcome of fore-bearing the chiseling

The log had a good after thought..
All the suffering, the chiseling, was given to it for its shaping.
Had it complained and not gone through the grind, it might have become another wasted log…
Thanking the Sculptor, (and the wasted logs for the advice), for his efforts, it just smiled.

(This post is inspired from a story over-heard — all images are googled, no claim on ownership)

Why is new-style(apps based) cab booking still a mess?

I assumed this new style will beat my old/traditional way of the whole cab experience, but HELL NO!

Every riders woes – Minutes before boarding a cab!
  1. Booking beforehand
    • Apps:You cannot book the app based cabs beforehand. One service allows, but only 0000 to 0700 hrs ? That’s superb customer service, Their systems maybe do not take peak hour requests!
    • My Way: Go ahead and book the cab even two weeks ahead and the cab will be right there for your need!
  2. The day of the booking
    • Apps: You forget about your last minute travels plannings, instead dedicate one human to constantly check for cab availability.
    • My Way:No problemo sire! We’ll be there and we’ll also carry your luggage from your house to the cab!
  3. At the 11th Hour of the booking
    • Apps: Hope you get through “ride now” option! And if you cancel, you are logged out of making any further bookings! Grr!
    • My Way: We will be there in exactly 10 minutes! Unfailingly!! (beat this experience!)
  4. The cab is there — where?
    • Apps: I am standing here, where are you (happens atleast 2 times) + Sir I thought booking was for 1130 hrs, you are coming after half hour, please cancel your request + Sir, you please cancel as you are not coming + Once I had this cab driver run away,with the cab, right infront of my eyes! That was so sorry look on my face!
    • My Way: The cab is visible right infront of your gallery!(Beat that! again? anyone??)
  5.  The ride begins
    • Apps: Sir, which route?. Hope you know where to go. We’ll ask someone there.(spend 15 minutes searching and asking everyone around)
    • My Way:Sit back, relax, sleep, They tell me when the spot is reached!(They use their phone for reaching the destination! -Ain’t that smart!)
  6. Post-The-Ride :: Tu Kaun?
    • Apps: me:Thank you for not abducting me and extorting money!
    • My Way: me:Thank you for taking care of my traveling woes!

Although “My Way” is 2x cost wise, but other comforts are simply not comparable! I can quote 10 more other problems with the apps. It’s still not my preferred way of traveling!

Driving dislikes me! I am interested to reach my destination with least hiccups!

I’ll post a follow-up with the state of self driving cars!

Javascript muggles don’t mess with Java’s strong type def structure!

Yes, this is going to be a rant post!

If you are in sync with the recent developments happening in/around open jdk you might have come across the JEP-286 | Local-Variable Type Inference

This JEP has been authored by none other than Brian Goetz and endorsed by Mark Reinhold himself(Yikes!).

I will straight away come to the points why I(no-one) vehematically (n:vehement) oppose this improvement!

  1. Code is read more than just written.
  2. There is max context when someone is writing an implementation for a method! All context needs to be dumped then and there. By bringing in this change, all this context will be lost for ever!
  3. This change introduces the idea of “I know its suppose to return X”, there will be no way to verify the claim, except the compiler-interpretation.
  4. Such changes belittle the language semantics! Well remember this: Milk of a lioness can be held in a gold container only else it goes sour! Java respects this semantics as of now! (Its really cool!).
  5. You can leverage power of automatic type suggestions while one is on RHS of the equation/statement, which has given a great boost to the language via lambdas. LHS *has* to be clearly defined.

Following are demo videos showing how easy and quickly one can do an alt-enter in your favorite ide and have the LHS of the assignment automagically inferred!

1/Simple example from the JEP

 

2/Complex examples using files from the same JEP

local_var_file

 

There are couple of surveys seeking public opinion on the same here are their links:

  1. Survey 1
  2. Survey 2

Finally, if you have seen Mark’s Java 9 intro speech, he starts off by talking about

1/No copy pasting a feature from any language just because its cool!

2/ Readability:

This JEP is not only killing Readability, but its not consistent across the language.!? There goes universality and compatibility into the garbage collector!

Let’s just keep evolving without giving up the things that make Java really stand strong on its feet! #DieJEP286