Monday, November 26, 2018
Sunday, November 25, 2018
PostgreSQL & Homebrew
https://stackoverflow.com/questions/15301826/psql-fatal-role-postgres-does-not-exist
If you're using postgres from Homebrew, then you want
If you're using postgres from Homebrew, then you want
/usr/local/Cellar/postgresql/9.2.4/bin/createuser -s postgres (for version 9.2.4, obviously). Saturday, November 24, 2018
Thursday, November 22, 2018
Database Indexes - How to determine if an Index is required or not
https://dba.stackexchange.com/questions/56/how-to-determine-if-an-index-is-required-or-necessary
http://blog.celerity.com/how-to-design-sql-indexes
http://blog.celerity.com/how-to-design-sql-indexes
22/08/2017, 19:03:36B-Trees in databases are not binary trees, they are BALANCED trees
Tuesday, November 20, 2018
UUID related
Seems like an exercise in trying to hack something using UUID guessing -
https://medium.com/@evinsellin/communicating-through-uuid-conflicts-fe50134304db
Labels:
computer science,
web applications
Electron, Desktop PWAs
Medium article:
https://medium.com/dailyjs/goodbye-electron-hello-desktop-pwas-f316b8f39882
YouTube video:
https://medium.com/dailyjs/goodbye-electron-hello-desktop-pwas-f316b8f39882
YouTube video:
Sunday, November 18, 2018
Saturday, November 17, 2018
Sunday, November 11, 2018
Friday, November 9, 2018
Wednesday, November 7, 2018
Database related - Composite Indexes
How do composite indexes work - https://stackoverflow.com/questions/795031/how-do-composite-indexes-work
https://stackoverflow.com/a/795068
https://stackoverflow.com/a/795068
Composite indexes work just like regular indexes, except they have multi-values keys.
If you define an index on the fields (a,b,c) , the records are sorted first on a, then b, then c.
Example:
| A | B | C |
-------------
| 1 | 2 | 3 |
| 1 | 4 | 2 |
| 1 | 4 | 4 |
| 2 | 3 | 5 |
| 2 | 4 | 4 |
| 2 | 4 | 5 |
- 12 Please note also that indexes are stored as Btree, so an (a,b,c) index will help on a search on (a) and on (a, b),
"MySQL can use multiple-column indexes for queries that test all the columns in the index, or queries that test just the first column, the first two columns, the first three columns, and so on. If you specify the columns in the right order in the index definition, a single composite index can speed up several kinds of queries on the same table." - Multiple-Column Indexes – AlikElzin-kilaka Sep 9 at 4:46
https://stackoverflow.com/questions/2349817/two-single-column-indexes-vs-one-two-column-index-in-mysql
https://stackoverflow.com/questions/179085/multiple-indexes-vs-multi-column-indexes?rq=1
https://stackoverflow.com/questions/2349817/two-single-column-indexes-vs-one-two-column-index-in-mysql
https://stackoverflow.com/questions/179085/multiple-indexes-vs-multi-column-indexes?rq=1
Monday, November 5, 2018
Thursday, November 1, 2018
Wednesday, October 31, 2018
Monday, October 29, 2018
Sunday, October 28, 2018
Friday, October 26, 2018
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 asgrep,sort,cut,paste,awk,wc,perl, etc., etc., by providing a quick,interactive, scrollable preview of their results.
Internationalization - React vs Angular
https://hackernoon.com/internationalization-in-angular-and-react-applications-a-comparison-93883f4e1cdb
Make sure to read the comments too.
Make sure to read the comments too.
Labels:
Angular,
javascript,
react,
web applications
Thursday, October 25, 2018
Tuesday, October 16, 2018
Erlang 'process'
https://www.quora.com/What-is-the-difference-between-system-threads-and-process-threads-as-in-Java-threads
Excerpt:
Excerpt:
Erlang uses the term "process" because it does not expose a shared-memory multiprogramming model. Calling them "threads" would imply that they have shared memory.
Sunday, October 14, 2018
Saturday, October 13, 2018
Thursday, October 4, 2018
Tuesday, October 2, 2018
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
-------------------------
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
Saturday, September 29, 2018
Wednesday, September 26, 2018
Sunday, September 23, 2018
Friday, September 21, 2018
Thursday, September 20, 2018
Monday, September 17, 2018
Saturday, September 15, 2018
React & JSX related: using JSX without React, minimal setup for trying out React
using JSX without React:
https://itnext.io/lessons-learned-using-jsx-without-react-bbddb6c28561
Minimal React.js Without A Build Step:
https://shinglyu.github.io/web/2018/02/08/minimal-react-js-without-a-build-step-updated.html
https://itnext.io/lessons-learned-using-jsx-without-react-bbddb6c28561
Minimal React.js Without A Build Step:
https://shinglyu.github.io/web/2018/02/08/minimal-react-js-without-a-build-step-updated.html
Thursday, August 30, 2018
Sunday, August 26, 2018
Saturday, August 25, 2018
Sunday, August 19, 2018
Saturday, August 11, 2018
Sunday, July 22, 2018
Spotify Engineering Culture
Spotify Engineering Culture
Spotify Engineering Culture - Part 1 -
Video: https://vimeo.com/85490944
Medium article: https://medium.com/project-management-learnings/spotify-squad-framework-part-i-8f74bcfcd761
Video: https://vimeo.com/85490944
Medium article: https://medium.com/project-management-learnings/spotify-squad-framework-part-i-8f74bcfcd761
Spotify Engineering Culture - Part 2 -
Video - https://vimeo.com/240501738
How is JavaScript used within the Spotify desktop application?
Quora question & answer:
https://www.quora.com/How-is-JavaScript-used-within-the-Spotify-desktop-application-Is-it-packaged-up-and-run-locally-only-retrieving-the-assets-as-and-when-needed-What-JavaScript-VM-is-used
Reddit Comments:
https://www.reddit.com/r/programming/comments/901p0j/former_software_engineer_at_spotify_on_their/
EDIT: It turns out that the Quora post was from 2015. The Reddit comments are scathing in their appraisal now.
EDIT: It turns out that the Quora post was from 2015. The Reddit comments are scathing in their appraisal now.
Labels:
design,
javascript,
software engineering,
web applications
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
Saturday, July 21, 2018
Rails related blog
2015 blog by Vaidehi Joshi - has posts about Rails - 1 post per week in 2015
http://vaidehijoshi.github.io/http://vaidehijoshi.github.io/blog/categories/number-technicaltuesdays/
Computer Science Basics
2017 blog by Vaidehi Josh
Exploring the basics of computer science, every Monday, for a year.
Tuesday, July 17, 2018
Design related
https://fundrequest.io/
Checkout the above site for a decent design to try and re-implement for practice
Monday, July 16, 2018
Thursday, July 5, 2018
Monday, July 2, 2018
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.
Friday, June 22, 2018
Airbnb’s new Design Language System
https://airbnb.design/the-way-we-build/
I did not understand much. Have to read these articles again.
I did not understand much. Have to read these articles again.
Labels:
design,
mobile,
software engineering,
web applications
Thursday, June 21, 2018
Tuesday, June 19, 2018
Monday, June 18, 2018
Sunday, June 17, 2018
Wednesday, June 13, 2018
Tuesday, June 12, 2018
Sunday, June 10, 2018
Sunday, June 3, 2018
Constructing HTML with Templates
Using templates with script type="text/template"
Saturday, June 2, 2018
Wednesday, May 30, 2018
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:
A Big Gap
Above categories miss one area - improving what already exists & works
Example:
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.
This simple idea/tool can help with the following:
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 -
I am not sure about this. My current opinion is -
Alternative Implementation
UserVoice is a widely used tool whose purpose is to collect ideas like I have discussed above.
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.
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.
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
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.
Suggestions/Ideas, however minor, are very important and hence need to be handled in the same process that is used for Bugs/Feature Improvements.
Subscribe to:
Posts (Atom)

MIPA