Thursday, July 10, 2025

Diworsification

One more investors book, One Up on Wall Street by Peter Lynch, taught me few things:

1.⁠ ⁠Invest in What You Know. 

⁠•⁠  Ordinary people can find great stocks by observing products, services, and trends in daily life, before Wall Street makes noise about them, and you read/hear about it in news.

2.⁠ ⁠Types of Stocks

•⁠  ⁠Slow growers – stable, low-growth companies (e.g. utilities).

•⁠  ⁠Stalwarts – large, reliable companies (e.g. Coca-Cola).

•⁠  ⁠Fast growers – small/mid companies with high growth.

•⁠  ⁠Cyclicals – tied to the economy (e.g. airlines, steel).

•⁠  ⁠Turnarounds – troubled companies with recovery potential.

•⁠  ⁠Asset plays – companies undervalued for their assets.

3.⁠ ⁠Do Your Own Research

•⁠  ⁠Don’t blindly follow tips or media.

•⁠  ⁠Understand the story behind the company, its fundamentals, and future potential.

4.⁠ ⁠Numbers Matter

•⁠  ⁠Learn to read balance sheets, earnings, P/E ratios, debt, growth rates, etc.

5.⁠ ⁠Long-Term View

•⁠  ⁠Time in the market beats timing the market.

•⁠  ⁠Be patient and let your investments grow.

6.⁠ ⁠Avoid Diworsification

•⁠  ⁠Don’t over-diversify to the point of weakening your portfolio.

Note, "Diworsification" refers to expanding into too many unrelated things, thereby reducing its overall performance and focus. Instead of strengthening, this kind of diversification actually worsens it — hence “di-worsification.”

7.⁠ ⁠Tenbaggers

•⁠  ⁠Focus on finding "tenbaggers" — stocks that can grow 10× in value.

With observation, logic, and discipline, regular investors can outperform professionals. Not me :)


Thursday, September 19, 2024

Who cares?

Not my Lemmings renamed my Prime Timesheet plugin for Jira to Time Tracker. As I remember 1000 Lemmings can't be wrong, but still my plugin used to be a reporting tool, rather than tracking. But "Question is, who cares" after all, Mana Mana.



Friday, August 16, 2024

Bad habits turned right

I've just read another great investors' book "Richer, Wiser, Happier" by William Green. Filtering it through my "painful" experience, of doing everything wrong, here are few notes in that perspective.

Chapter I. Copying is not that bad, that's my experience and first chapter is about. Pabrai copied Warren Buffet idea buying low cost. My wife copied ABC Yoga project. To succeed shamelessly copy others people's best ideas, and celebrate success together!

Chapter II. Being lonely, makes you independent and distinguishing from the crowd.

Chapter III. World is constantly changing, stability is not an option, however it's better to HODL assets. 

Chapter IV. Be resilient to wild market. Life is not simple the same as market, respect reality.

Chapter V. Keep it simple, better done than perfectly planned.

Chapter VI. And there's no rush.

Chapter VII. Be consistent in your strategy, even if it's not the best, it will compound over time.

Chapter VIII. Avoid common errors, and try again, if possible, just improve what did not go well. It's difficult to be smart, but it's possible to go around problems. Charlie Munger.

Being rich means to have fulfilled life, a lot of friends, big family, many tasks and plans. And it's all about people. We're living for someone, not for something. Van Den Berg.


Saturday, January 13, 2024

As if I knew it will happen (Pernicious illusion)

My long long journey has ended up, finally. Quite expected, but still very disappointing, while enjoying Alps in September, I've been informed that as of December 31st 2023, Tempo Software Inc. will no longer require my services in conjunction with the Prime Timesheets product. I wish my work were still useful, though. 

Not used


But what I've created will live, for how long? I'll keep watching!

Meanwhile I've got a chance for another very interesting reading, very relevant to my Blog: Thinking: Fast and Slow by Daniel Kahneman. Here I'd like to write down my summary - collection of psychological biases. I love (to make every possible) mistakes!

Focusing illusion


Affective forecasting, buying bigger house or moving to better location will not make you happier, misswanting.

Pernicious illusion


The Illusion of Understanding, outcome bias From Nassim Taleb (black swan): narrative fallacy: our tendency to reshape the past into coherent stories that shape our views of the world and expectations for the future.

Muller-Lyer illusion


Fallacy remains attractive.

Conjunction fallacy, less is more


When you specify a possible event in greater detail you can only lower its probability. The problem therefore sets up a conflict between the intuition of representativeness and the logic of probability.
conjunction fallacy: when people judge a conjunction of two events to be more probable than one of the events in a direct comparison.

Cognitive dissonance/ease


What You See Is What There Is (WYSIWTI) and “Nothing in life is as important as you think it is, while you are thinking about it”

Anchoring Effect


When you consider a particular value for an unknown quantity before estimating that quantity. What happens is that estimate stay close to the number suggested.

Halo effect


The tendency to like (or dislike) everything about a person—including things you have not observed.

The Law of Small Numbers


Small samples yield extreme results more often than large samples do.

Saturday, February 11, 2023

Thinking about sinking boat

It's been so long, since I have shared my thoughts, and I don't think it's worth of anything, and I have no idea what I'd like to get from it.
And still, I've got few ideas, that of course look useful to me, but it's too late to start over with something new.

Zaznam o nehode (Accident record) online

Mobile app (or smart webapp), based on zaznam o nehode PDF, with user stored details about their vehicle, exchanged by counterparts of accident, signed with face-and-id photo, drawing with drag and rotate vehicles, cross-road and signs and finger brushing hit places, integrated with police and insurance, assistance and repair services, free for personal use, paid by business, carsharing.

I wrote to ozvemese@ideasense.cz, in response to Learning which one will not get out of ones mind (in Czech) (I had the idea back in 2017), but they need settled business idea, not just thoughts.

Tax automation.

Fill tax declaration automatically basing on bank account statement. Categorize income by source type Parse insurance, kindergarden documents for tax deduction.

May be integrated with bank app, and pay tax and preliminary tax automatically.

Slicing Pie for Jira.

Project funding, coin pool, distribute on log work timeSpent/estimate (less/more if estimate is changed), mining on issue created/estimated, tatum api with private key (ssh does not pass one, session key instead) address by public key from github/bitbucket.

"An embedded token contains information about which workers have worked on the product and been involved in transporting it by truck to the harbour and the ship etc. ... Since the contracts with the suppliers are defined as smart contracts in a distributed ledger technology network, all payments are automated".
See also 

Investing advisory


Is it good for me to invest, considiring my current cost of living, income, personal and world expectations, based on known facts.

I start from the fact that investing is a science that not everyone has to understand, but they have to invest, and it can be quite modeled, for example, a family as a business, has income and expenses, and certainly has phases of the life cycle, and these are the parameters of the investment model, to that we add distribution according to modern knowledge, so that family will need an investment reserve, about some multiple of expenses, and the rest can be invested according to distribution based on life stage and market conditions.

Tuesday, August 26, 2014

Playing with real-time content delivery (WebSocket)

This time I'd like to share some results of experimenting with Firebase and Socket.IO while playing with real-time content delivery with WebSockets a bit.

FireBase - NoSQL database, has a powerful API to store and sync data in real-time using WebSocket. It also has perfect Security Rules system, which allows to restrict read and write access to data in the manner I was dreaming about when playing with CouchDB back in 2011. The goal was to let everyone access only his or her data right from the browser. So, here is an example of security rules that suites this need:
{
  "rules": {
    ".read": false,
    ".write": false,
    "users": {
      "$user": {
        ".read": "auth.uid === $user",
        ".write": "auth.uid === $user"
      }
    },
    "data": {
      "$data": {
        ".read": "auth.uid === data.child('uid').val()",
        ".write": "auth.uid === data.child('uid').val()"
      }
    }
  }
}

Then there are many ways to authenticate. With Simple Login, it could be static web site hosted on FireBase, similarly to CouchApp, fantastic! But I decided to try custom authentication, and integrate Firebase with Atlassian Connect Add-On in Node.js using atlassian-connect-express.

Here is relevant part of client javascript. That simple to get own data:

addon.js

  var rootRef = new Firebase("https://example-multi-tenant.firebaseio.com/data");
  rootRef.auth(firebaseToken, function(error) {
    rootRef.on("value", function(snapshot) {
      var data = snapshot.val();

And firebaseToken is generated serverside basing on authentication information provided by Atlassian Connect. So I map clientKey to uid for Firebase security rules:

routes/index.js:

    var FirebaseTokenGenerator = require("firebase-token-generator");
    var tokenGenerator = new FirebaseTokenGenerator(process.env.FIREBASE_SECRET);

    app.get('/whoslooking', addon.authenticate(), function (req, res) {

        var clientKey = req.session.clientKey;
        var firebaseToken = tokenGenerator.createToken({ "uid": clientKey });

I did not come to particular useful use-case yet, and have tried to clone existing Who's Looking add-on for JIRA, but there must be better ideas to try out with this approach.

For such simple case, it looked overcomplicated to me, so I've given Socket.IO a try, and ended-up actually within Engine.IO, which is the WebSocket semantics transport layer Socket.IO uses.

The main interesting part for me is authenticating connections, so that only add-on could connect. Here is the trick to leverage atlassian-connect-express authentication within allowRequest function that can decide whether to allow WebSocket request or not in app.js:
var authentication = require('atlassian-connect-express/lib/middleware/authentication.js');
var authenticationHandler = authentication.authenticate(addon, true);

var server = http.createServer(app);
var io = require('engine.io').attach(server, {allowRequest: function(req, next) {
  req.query = req._query;
  req.header = function(name) {
    return req.headers[name];
  };
  var res = {
    send: function(code, msg) {
      next(msg); // error
    },
    setHeader: function() {}
  };
  authenticationHandler(req, res, function(err) {
    next(err, !err); // success
  });
}});

Then Who's Looking logic itself is very simple. State is just kept in memory serverside, and is updated when connection is open or closed, and every time simple message is sent to client with all users currently looking at JIRA issue, no heart-beat (or long polling) and database. Nice and easy, isn't it?

Such add-on can be deployed to Heroku, by the way, it has support for WebSockets already!

Monday, March 10, 2014

Building website with Punch

Finally, I've got something, hopefully useful, to share. Today I would like to describe fully automated and completely free way of publishing and hosting static website with Punch and Jenkins.

Punch


Punch is a simple, intuitive web publishing framework, like, probably better known, Jekyll. I've found it better for myself because of possibility to write custom content handlers. Overall,  I think, Punch can be viewed as more generic website publishing framework than Jekyll. Also it's Node.js application.

Though I was missing automatic publishing like gh-pages. But I have recently come across nice post about Building a private gh-pages clone with dexy and gitlab, which mainly inspired me to investigate this drawback.

DEV@Cloud (Jenkins)


Jenkins is the #1 open source continuous integration tool. And it's offered by Cloudbees as a Service, also well known as DEV@Cloud. Luckily, among great bunch of possibilities, it allows to build Node.js projects, which is the core part of my solution, though very simple.

My manual build shell script is as follows:
curl -s -o use-node https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/node/use-node
NODE_VERSION=0.10.4 . ./use-node
npm install -g punch
npm install
punch p
The last command generates and publishes site. Punch supports publishing to Amazon S3 or to a custom server with SFTP out of the box, but with GitHub or Bitbucket you can host your static website for free, see GitHub Pages again and Publishing a Website on Bitbucket. So, we'll need to define custom publishing strategy.

Punch git publisher


I have not found available punch-git-publisher useful - at the moment of writing it is unfinished. So I've created own git publishing strategy: punch-git-publisher.js. It needs to be configured in punch config.json as follows:
"plugins": {
    "publishers": {
        "git_strategy": "./lib/punch-git-publisher.js" 
    }
},

"publish": {
    "strategy": "git_strategy",
    "options": {
        "repo_url": "git@bitbucket.org:azhdanov/azhdanov.bitbucket.org.git"
    }
}

Brining it all together


The most interesting part, automating :) I host my website project on Bitbucket, similarly to website itself. Although I believe it will work with GitHub in very similar way for User or Organization and Project pages, however for the latter you will need to modify punch-git-publisher.js to commit in gh-pages branch.

Below is few simple steps to make your changes in punch project trigger automatic build and publishing:
  1. Obtain Jenkins API key. For DEV@Cloud see https://<account>.ci.cloudbees.com/user/<the-user-portion-of-your-email>/configure, e.g. https://avalez.ci.cloudbees.com/user/azhdanov/configure.
  2. Enable 'Trigger builds remotely' in your Jenkins project configuration.
  3. Add commit hook, e.g. see Jenkins hook. For DEV@Cloud EndPoint must be similarly to above, i.e. https://<the-user-portion-of-your-email>:<apitoken>@<account>.ci.cloudbees.com, e.g. https://azhdanov:***@avalez.ci.cloudbees.com
  4. Add Jenkins ssh public key to your Bitbucket account to let build push generated website content to the repository. Here is good writeup for Github: How to use private github repositories with cloudbees, and Bitbucket: Add an SSH key to an account.
Now, just do your changes, commit, push, and if you're lucky, you get your website updated in a minute, all like Using Jekyll with GitHub Pages. Here is the overall picture:



Let me know how it works for you ;)

References

  1.  punch-git-publisher.js