Friday, October 26, 2018

labex.io - online courses with virtual environments

https://labex.io/courses

Has courses for Alibaba Cloud also.

up - tool for writing Linux pipes

https://github.com/akavel/up

up is the Ultimate Plumber, a tool for writing Linux pipes in a terminal-based UI interactively, with instant live preview of command results.
The main goal of the Ultimate Plumber is to help interactively and incrementally explore textual data in Linux, by making it easier to quickly build complex pipelines, thanks to a fast feedback loop. This is achieved by boosting any typical Linux text-processing utils such as grepsortcutpasteawkwcperl, etc., etc., by providing a quick,interactive, scrollable preview of their results.

IronDB, EverCookie

Internationalization - React vs Angular

Saturday, October 13, 2018

Tuesday, October 2, 2018

react-native-turbolinks

Mongo - exporting and importing a single database

On Source Machine
-------------------------
mongo
> show dbs
> exit

mongodump -d abc_xyz_development

(Above command will create a dump/abc_xyz_development folder and put all the files inside it. This folder will need to be zipped and sent to whoever wants to import the database)

On Target Machine
-------------------------

Drop existing database
mongo

> show dbs

> use abc_xyz_development;
> db.dropDatabase();
> exit

Restore from Dump folder:
Command:
  mongorestore -d
E.g.
  mongorestore -d abc_xyz_development ~/abc_xyz_development

Wednesday, September 26, 2018

Sunday, July 22, 2018

Only Remote Developers Job Board

Getting started with DevOps

A step-by-step implementation for genetic algorithms

ramd.js JavaScript library for making web applications.

CAP Theorem

Spotify Engineering Culture

Spotify Engineering Culture



React JS prototyping - Building a high-fidelity prototype

How is JavaScript used within the Spotify desktop application?

Using jQuery vs more advanced JS frameworks


"Jquery results in mostly event handling and procedural code. The more advanced frameworks, if used properly end up more declarative with some event handling. That's much easier to write, read and understand."

Card

Tuesday, June 26, 2018

The Moden C++ Challenge - good book to improve programming with general stuff


Book link in pactpub.com - https://www.packtpub.com/mapt/book/application_development/9781788993869

Blogpost about the book by a C++ expert:
http://scottmeyers.blogspot.com/2018/06/interesting-book-modern-c-challenge.html
All in all, there are 100 problems in a variety of areas, including string processing, dates and time, concurrency, cryptography, and networking.

Sunday, May 27, 2018

An Important Gap in Software Development Process: How to improve what already exists

Current Focus of most Processes is on getting things done (i.e. productivity) and not on encouraging/generating/collecting/discussing Ideas (i.e. innovation?).

Below post is on one of the problematic side-effects of such a focus, and a trivially simple, but powerful solution to deal with that problem.

In Software Development, when Tasks are created in Project Management tools like Jira, they are usually:
  • Bugs to fix
    • existing stuff is not working as intended
  • Feature Improvement
    • client wants to make changes/additions to the existing stuff
    • OR client asks for a brand new feature
Bugs & Feature Improvements have one thing in common - the Point of Initiation of Work is a very clear business need. If all work is initiated like the above, we will end up with one Big Gap in our product development process - existing stuff never improves.

A Big Gap

Above categories miss one area - improving what already exists & works

Example:
  • Let's take one webpage in our web-application where things are working as intended (i.e. no complaints/change-requests have come from clients/users)
  • But there are aspects about it, like UI/Performance/UX, that different members of the team/company feel, can be improved.
    • Currently there is no way for anyone to initiate work on that webpage 
    • and that is the Big Gap i am referring to - there is no way to initiate work on existing stuff
    • And this Big Gap continues to exist indefinitely, because there are always going to be tasks with higher priorities that need attending to, than discussing, for example, about some minor UX/UI improvement on a webpage that is seemingly working fine.
A Solution

How do we improve what already exists and works?

I have realized that when a team identifies a problem and discusses it, it generally tends to make a good decision about the solution.
Simply put, if a topic is brought up on the agenda, it gets addressed/resolved.
The converse is unfortunately true as well - if an issue does not reach the agenda, it never gets addressed/resolved.

So we need to somehow bring tasks related to 'improving Existing Stuff' onto the Agenda.

How do such tasks come into existence, so that they can be added to the Agenda?

We need ideas, in fact a lot of ideas, big and small, to improve what already exists.

In order to do this, in my opinion, we need to create/implement a new Category of tasks, perhaps called Suggestion For Discussion, or Discussion Task, or something like that.

  • Creating a new category should be a trivial thing to do in tools like Jira

What is a 'Suggestion For Discussion / Discussion Task' ?
  • if ANYONE in the team/company has a suggestion/idea, they create a Suggestion For Discussion /Discussion Task in the Project Management Tool (e.g. Jira)
Who is it assigned to?
  • this is assigned to whoever is in charge of that specific area (a Project Manager or Product Owner, etc)
What is the Goal of such a task?
  • The goal of such a task is to make sure a Discussion happens around the Suggestion given
How is such a task completed?
  • the team can meet periodically (once a week, biweekly, monthly etc) to discuss such Suggestions
  • the Agenda for such a meeting could be the set of Suggestions that PM/Product Owner has received recently. This is a very important aspect because
    • having a very clear list of things to talk about is very different from adhoc-brainstorming-sessions
    • ensures a sustainable way for doing the meetings
      • People often stop going to meetings that are haphazard, and suddenly such meetings stop happening
  • a decision is made to accept a Suggestion, not-accept a Suggestion, or to revisit the Suggestion later on, and this is how such a task is 'resolved'.
How will these tasks help in improving what already exists?

This simple idea/tool can help with the following:
  • Provide a path in the process: This will give an official path for an idea/suggestion, however small or big, to reach fruition
    • This is the main contribution of this idea/tool.
  • Everyone thinks: Instead of Devs only writing code or QA only spotting issues, everyone will get a chance to think about how to contribute via Ideas/Suggestions as well
  • Prevent Ideas from being forgotten: A person who has thought of an idea can create a Suggestions-for-Discussion task at that moment - this will prevent ideas from being lost
  • Short-term effect: immediatley get to the job of improving existing stuff
  • Long-term effect: foster a culture of innovation
  • Maximize potential of existing team & Reduce burden on Superstars: Innovation/Ideas/Suggestions will not depend on just a few key individuals in the company, but will be the domain/responsibility of everyone. Superstars (i.e extremely talented individuals) like to work in stimulating & engaging environments where everyone is contributing, otherwise they also get fatigued.
    • In cases where teams do not have Superstars, they can at least perform to the best of their collective potential.
  • No Barrier for Contributing: New Employees Or Junior Team-members Or even Experienced team-members who are Not so Social, i.e anyone, can contribute ideas/suggestions without depending on what kind of personality they have OR what kind of personal rapport they have with a PM/Product Owner.
  • Improved job satisfaction when ideas/suggestions are accepted

Why can't the person who has a Suggestion, just go and talk to the Product Owner/PM, OR discuss the idea in one of the meetings?

The reason why Discussing-with-PM-or-in-Meetings will not work is - 
  • Things that are not urgent are better handled in an Asynchronous manner
    • e.g. we stick a PostIt note or add a ToDo item somewhere to remember to do stuff that we have to do later.
    • The very reason we use ToDo lists or PostIt notes, or even Project Management tools like Jira is because we cannot do all the things that need to be done at the same time.
    • By this argument, Ideas/Suggestions for Discussion need to be treated in the same way.
  • People might not feel comfortable suggesting minor improvements in a meeting-setting
    • Consider the scenario of a Dev/QA who has thought of, not major improvements, but just a couple of minor UX improvements
    • They might not feel comfortable speaking about such minor suggestions in meetings
Limit this idea to Existing Stuff ?

This simple tool/technique is actually about gathering ideas from everyone, and hence can be used to gather ideas about Existing Stuff as well as for New Features.

So the question is - is it better to limit this tool to gathering ideas about Existing Stuff? 

I am not sure about this. My current opinion is - 
  • Initially i.e. until everyone gets used to it, it is probably better to limit this tool only to suggestions related to Existing Stuff
    • This is needed because, it is important for everyone to understand that it is OK (and in fact, desirable) to contribute minor changes as well.
    • If brand new Feature Improvements also are allowed to use this tool - this tool might get hijacked by the new & shiny stuff (and people might not feel comfortable contributing 'small' ideas).
  • Perhaps we could have 2 separate categories, one for Existing Stuff and one for New Stuff.

Alternative Implementation

UserVoice is a widely used tool whose purpose is to collect ideas like I have discussed above.
However UserVoice is being used to collect feedback mostly from Clients/Users and not from Developers/QA/PMs. 

Perhaps Devs/QA/PMs can use something like UserVoice for the exact same purpose too.

However I feel it is easier & better to treat Discussion of Suggestions/Ideas as Tasks and hence use the same Project Management tool that is used for Bugs and Feature Improvements.

Final words

Current Focus of most Processes is on getting things done (i.e. productivity) and not on encouraging/generating/collecting/discussing Ideas (i.e. innovation?).

Suggestions/Ideas, however minor, are very important and hence need to be handled in the same process that is used for Bugs/Feature Improvements.

Saturday, April 28, 2018

Track

iOS - 10
https://docs.microsoft.com/en-gb/xamarin/ios/get-started/hello-ios-multiscreen/hello-ios-multiscreen-quickstart?tabs=vsmac

Ruby, RoR - 0.5

React -

Vue - 4
https://www.vuemastery.com/courses/intro-to-vue-js/vue-instance

Electron - 4
- have to check how notifications are shown (which are notifications and which are just toastr messages; where is notification manager?)
- faye code to show notifications?
- rules engine
- how to submit an Electron app to Windows Store & Mac App Store
  -- can we submit a sample app
- prevent session timeout so that user stays logged-in
--- if user stays logged-in, then things that happen at login time (like Login Interrupts) need to be triggered when user launches app
- can we write code to distinguish whether user is using browser or Electron app ?
- look at Google Analytics for different clients to see usage on Windows and MacOS
- on Macs we can show Notifications that stay on the screen; can we do the same on Windows? 

Monday, April 16, 2018

Mongodb related

1) Export
mongodump
Above command will export everything (all databases) into a folder called 'dump'

2) Import
mongorestore dump

Sunday, April 8, 2018

Rails: How to chain scope queries with OR instead of AND?

Internal Side Projects

I wrote the below comment in reddit.com/r/programming in response to a medium.com post about Hype Driven Development

There is a solution in my opinion: Internal-Side-Projects.

The only way, for a team to choose/decide in an informed manner, is to do some Internal-Side-Projects using the said framework/stack. Internal-side-projects = something non-critical but useful that everyone can work on, and should work on.

At the minimum, all senior-developers in the team/company should do be indulging in this. If we do this, when the time comes to make a decision, the team will actually have meaningful discussions. Sometimes decisions become obvious when people actually know what they are talking about. (The happy side-effect is that developers remain happy as they get to learn new things.)

However, for this to be practically possible, the company's culture should plan for & encourage such internal-side-projects.

This is absolutely essential for a company/team to remain competitive in the long-run.

Saturday, March 24, 2018

Rails: Full-Text Search related

Pg_Search & SearchKick are gems 

Pg_Search vs SearchKick
https://www.webascender.com/blog/rails-search-gems-searchkick-vs-pg_search/

Pg_Search

One of the best features of Postgres is the built-in, full-text search capabilities. The pg_search gem helps maximize these capabilities by providing a powerful, yet simple, search capability. pg_search is great for a basic search that will search multiple models, associations, and is able to hook into advanced Postgres features in the optional contrib package. This contrib package allows fuzzy and trigram searching.

ElasticSearch & SearchKick in Depth
https://www.webascender.com/blog/rails-elasticsearch-searchkick-depth/

SearchKick:
Github: https://github.com/ankane/searchkick
GoRails video: https://gorails.com/episodes/elasticsearch-with-searckick
DriftingRuby video: https://www.driftingruby.com/episodes/searchkick-and-elasticsearch

Other videos related to Search:
- Ruby on Rails - Railscasts #278 Search With Sunspot - https://www.youtube.com/watch?v=6ub9OYNvHZk
- Ruby on Rails - Railscasts PRO #343 Full-Text Search in PostgreSQL (pro) - https://www.youtube.com/watch?v=n41F29Qln5E
- RailsConf 2016 - Multi-table Full Text Search with Postgres By Caleb Thompson - https://www.youtube.com/watch?v=OzHhJPlgZaw


Rails: Best practices for running Rails in production

ActiveRecord related: marginalia gem - for adding comments to ActiveRecord queries

https://signalvnoise.com/posts/3130-tech-note-mysql-query-comments-in-rails
From https://github.com/basecamp/marginalia:
Attach comments to your ActiveRecord queries. By default, it adds the application, controller, and action names as a comment at the end of each query.
This helps when searching log files for queries, and seeing where slow queries came from.
For example, once enabled, your logs will look like:
Account Load (0.3ms)  SELECT `accounts`.* FROM `accounts` 
WHERE `accounts`.`queenbee_id` = 1234567890 
LIMIT 1 
/*application:BCX,controller:project_imports,action:show*/
You can also use these query comments along with a tool like pt-query-digest to automate identification of controllers and actions that are hotspots for slow queries.
......
.......
Marginalia ships with :application, :controller, and :action enabled by default. In addition, implementation is provided for:
  • :line (for file and line number calling query). :line supports a configuration by setting a regexp in Marginalia::Comment.lines_to_ignore to exclude parts of the stacktrace from inclusion in the line comment.
  • :controller_with_namespace to include the full classname (including namespace) of the controller.
  • :job to include the classname of the ActiveJob being performed.
  • :hostname to include Socket.gethostname.
  • :pid to include current process id.

Sunday, February 25, 2018

Turbolinks related: InstantClick

InstantClick library -
http://instantclick.io/click-test 

Discussion in Turbolinks related to idea established in InstantClick library:
Prefetch Loading - https://github.com/turbolinks/turbolinks/issues/84
turbolinks "instantclick" - https://github.com/turbolinks/turbolinks/issues/313 

Barba.js - barba.js is a small (4.4kb minified and gzipped), flexible and dependency free library that helps you creating fluid and smooth transitions between your website's pages.
http://barbajs.org/index.html
https://www.smashingmagazine.com/2016/07/improving-user-flow-through-page-transitions/

Other related links:
https://news.ycombinator.com/item?id=12481969
https://github.com/Easyfood/pageAccelerator

https://caniuse.com/#feat=link-rel-preload
https://css-tricks.com/prefetching-preloading-prebrowsing/ 

Sunday, February 4, 2018

Ruby Metaprogramming related

Instance Methods, Class Methods, Singleton Methods.......
https://stackoverflow.com/questions/212407/what-exactly-is-the-singleton-class-in-ruby

Great video on Ruby Metaprogramming - multiple viewings essential
https://youtu.be/7D9wwPniszY

Saturday, February 3, 2018

Difference between Couchbase & Mongo

 https://blog.couchbase.com/data-modeling-nosql-documents-mongodb-vs-couchbase-server/
The referred documents in Couchbase can be joined in a single server side operation through N1QL rather than forcing the application layer to take care of it.
 ......
.......

The core differences come in regards to how you query the documents. It is much easier to query for data in Couchbase through N1QL and the other query strategies, regardless how you’ve chosen to model your documents.
If you’re interested in seeing a modeling and querying video I recorded, check it out here.


Monday, January 15, 2018

Sunday, October 22, 2017

headless-chrome - getting started in ruby

headless-chrome

- Install Chrome 59 or later from google.com/chrome

- download chromedriver and put in a new folder called 'chromedriver'; so the path to the binary is similar to - /home/sai/chromedriver/chromedriver

- now we have to add the above binary's path to PATH 
-- Open the below file in nano editor
nano ~/.bash_profile
-- add the below line
PATH=$PATH:/home/sai/chromedriver export PATH

- gem install selenium-webdriver

- gem install chromedriver-helper

- Now we can start executing the scripts found in -  https://readysteadycode.com/howto-scrape-websites-with-ruby-and-headless-chrome

Wednesday, September 27, 2017

Git related: DeepGit - tool to investigate the history of source code

https://www.syntevo.com/deepgit/

DeepGit is a tool to investigate the history of source code. It is based on git blame and makes it easy to trace changes to a line or block of code. DeepGit will detect code movements, even if lines are not identical.

Thursday, September 7, 2017

Rails debugging related

Use sth similar to below alongwith binding.pry

caller.select{|c| c.include? "rails-project-folder-name"}

This will give the list of callers (methods) that are your code.


Wednesday, August 30, 2017

Try Ruby in the browser

The software engineering rule of 3

https://erikbern.com/amp/2017/08/29/the-software-engineering-rule-of-3.html

Excerpts:
 first rule of 3. Don’t worry so much about code duplication if you only have two classes or two functions or whatever. When you see a pattern in three different places, it’s worth thinking about how to factor it out.
...
...
 second rule of 3 — you’re not going to get the system design right until the third time you build it. 

Sunday, August 27, 2017

Kibana related: Searching in Kibana

https://lucene.apache.org/core/2_9_4/queryparsersyntax.html

Search for 2 strings using AND operator:
"15-0001" AND "10-0005"

Choosing a frontend JS framework

https://medium.com/front-end-hacking/how-it-feels-to-learn-javascript-in-2017-a934b801fbe

Excerpt:
Interesting. Which one should I use? The big ones are React, Angular and Ember, right?
-They’re all good. If you want to write your front-end logic in Handlebars use Ember. If you want to write your front-end logic with HTML attributes use Angular or Vue. If you want to write your front-end logic with JavaScript use React, Mithril or Inferno.

Followers

Blog Archive