Sunday, November 15, 2015

I just finish reading Mastery by Robert Greene. At over a thousand pages, it took over six hours non stop. I put the audio player at the maximum speed where I could still understand what was going on. I have to go to work during the week so I have to wait until the weekend to read a book this long. So far, I have been reading lighter books and have been avoiding the big ones because I am not used to reading this much and I don't want to feel overwhelmed.

So, How was the book itself beside very long. What I got from it is that all the things that I am expecting to accomplish during the next year are completely impossible with my current mindset. Nothing that I can do today is up to the level of my dreams. My only option is to pick a few simple things and do them over and over until I can learn the skills needed to move to the next level. Right now it is past three in the morning, I have just spent over six hours staring at a computer screen, so it is unlikely that I can write anything intelligent here, but I am starting to form some ideas. What I have learned from the book is that big things take time and dedication. I already know this, but also that I need a clear path in my hear as to how I will move forward.

I am falling a sleep here, I will pick this up in the morning.

Wednesday, November 11, 2015

I just finished reading another book called the one hundred dollar startup. What I am thinking of right now is how do I start my own business. I do have a YouTube channel that could make money as well as other ideas. But the problem is that I completely fail when it comes to project management. What I am thinking of doing is simply to take programming concepts, sometimes from Wikipedia or other places, and translate them into simple visual explanations. That is clear enough, but the problem is that even the simplest things will have hundreds of sub-projects that will need to be explained separately. Whenever I try to code something, I usually try to do it all at once from memory. Even if I try to make a plan or diagram, I have no real concepts about how to follow a plan and do things step by step. It is easy for someone who knows how to do this sort of thing naturally to not understand how I could have trouble with following a plan, but I have a lifetime of difficulty with this and have only recently learned that breaking down a project into smaller steps was something that you are supposed to do.

For example, what is a suffix tree. I first figured out how to do one of these by drawing a picture. Eventually it was simple enough to understand. When I try to code it, I had some trouble, but I eventually forced my way through it. Even as I am writing this paragraph, the same problem is coming through. I am just writing what comes into my head. There is no way that I could ever run any business this way, but that is just how I think. Before I can move forward, I need to get into the habit of planning before I act. If I can just do this simple thing, everything else will follow.

Monday, November 9, 2015

I think I got an idea as to why I can never get anything done, I have no plan. There are many times during the day when I just cannot think of what to do next. For example, I just finished reading a book. I had planned for the book to take four hours because I listen to audio books at double speed while reading the text at the same time. This book only took about three hours and at the end, I just became confused as to what to do next. I figured that it would be time for bed when I was done, and now there is nothing for me to do. If I had a clear to-do list, this would not be a problem at all. One of the books that I recently read told me that habits are just what our brain turn to when there is nothing pulling on us. Like gravity, if we do not push ourselves in the direction we want to go in, we will simply get pulled back towards whatever feels good at the time. Addiction is not a compulsion to do something, it is just what our brain defaults to when it has nothing better to do. If I were to make a to-do list right now, what would be on it. I really don't know for sure. I can pretend like there are those things that I want to do, but those are all random dreams. I really cannot think of anything right now that I very concretely want to do right this moment. There is nothing that is not just a wish like make more money. I could clean my house, wash the dishes, write some JavaScript code, make a YouTube video. All those things are just small disconnected pieces. If you want to learn, there are to be a reason. I would like to learn how to speak Finnish, why? Can I figure out a good way to incorporate that desire into my life goals. I am going to read another book after work tomorrow night, what will I do after I am done. What are my goals, beyond the small things that I would like to do. I really don't know. I keep getting advice from small blogs about how I should write down all I need to do during the day, but what will that do for me. To start with, there is no need to remake your entire life in one day. Having a list of things to do is not a life plan, it is just something to get you started. Making a checklist for a single day and completing everything on it will start you towards something bigger, even if it doesn't look that big at first. At the very least, it is better than nothing.


I really need to update the look of my pages here. Read something about how to get all this to look the way you want.
Books I have been reading, plan to do thirty in thirty days.
1. Saturday November Seven : Charles Duhigg -The Power of Habit. 
2. Sunday November Eight : Brendon Burchard - The Motivation Manifesto.
3. Monday November Nine : Gary Vaynerchuk - Crush It! Why NOW Is the Time.
4. Tuesday November Ten : Chris Guillebeau - $100 Startup Reinvent the Way You Make a Living 
5. Wednesday November Eleven : Dave Lakhani - The Power of an Hour
6. Thursday November Twelve : Alan Deutchman - Change or Die
7. Friday November Thirteen : Rolf Dobelli - The Art of Thinking Clearly
8. Saturday November Fourteen : Robert Greene - Mastery
9. Sunday November Fifteen : Daniel Coyle - The Talent Code
10. Monday November Sixteen : Alistair Croll - Lean Analytics - Use Data to Build a Better Startup Faster
11. Tuesday November Seventeen : Bill OHanlon - A Lazy Mans Guide to Success 2009
12. Wednesday November Eighteen : Mihaly Csikszentmihalyi - Flow - The Psychology of Optimal Experience
13. Thursday November Nineteen : Dave Logan - Three Laws of Performance
14. Friday November Twenty : Pat Mesiti - The $1Million Reason to Change Your Mind
15. Saturday November Twenty One : Eric Ries - The Lean Startup
16. Sunday November Twenty Two : Ryan Holiday - The Obstacle Is the Way
17. Monday November Twenty Three : Dale Carnegie - How-to-win-friends-and-influence-people
18. Tuesday November Twenty Four : Topher Morrison - Settle For Excellence
19. Wednesday November Twenty Five :  Gabriel Wyner - Fluent Forever
************November 26************* House got robbed. No book tonight.
20. Friday November Twenty Seven : Richard Bandler - Using Your Brain for A Change
21. Saturday November Twenty Eight : Richard Bandler - Frogs into Princes
22.                      Richard Bandler and John Grinder - Reframing - NLP & The Transformation Of Meaning     *****************Read two books this day to make up for Thursday.                                       
23. Sunday November Twenty Nine : Maxwell Maltz - Psycho-Cybernetics
24. Monday November Thirty : George Clason - The Richest Man In Babylon
25. Tuesday December First : Josh Linkner - Disciplined Dreaming
26. Wednesday December Second : Howard Dvorkin - Power Up Taking Charge of Your Financial Destiny
27. Thursday December Thrid : Gay Hendricks - The Big Leap
28. Friday December Four : Lisa Haneburg - Two Weeks to a Breakthrough
29. Saturday December Five : Pete Goodliffe - Becoming a Better Programmer
30. Sunday December Six : Theodore Bryant - Self-Discipline in 10 days - How To Go From Thinking To Doing
**** Done the first thirty, but will not stop here.

31. Wednesday December Nine : Gary Keller - The One Thing
32. Saturday December Twelve : Steve Siebold - How Rich People Think
33. Sunday December Twenty : Steve McConnell -  Code Complete (2nd Edition)
34. Sunday December Twenty : Gary Vaynerchuk - The Thank You Economy
35. Monday December Twenty One : Jesse Itzler - Living with a SEAL
36. Saturday January Second : Ayn Rand - Ayn-Rand-Atlas-Shrugged

37. Sunday January Eighteen : John Templeton - The Templeton Plan.
38. Monday January Nineteen : Nietzsche, Friedrich - The Birth of Tragedy.

Sunday, November 8, 2015

I have a slight problem here. There is this Finnish Song that I am trying to learn and my current method is to write down something twenty times, mostly from memory until I know it perfectly well. I have use this method to learn the alphabet backwards and also other small things. The problem is not really learning the song, its the way that I am trying to learn it. Instead of learning parts of the song and then moving on to another part, I just try to learn the whole thing all at once. I have spent two nights now trying to copy every word in a text that I mostly don't understand. My brain has been fighting against the process all the time and I have a lot of trouble getting up the will power to even start doing it. All I can think about is that I have to do this twenty times, that does not make any sense. Right this moment, I have no idea what to do next, nothing really seems to work. But of course, how could anything work, I have never taken the time to really learn anything about learning a language. There are no good books about learning Finnish that I can find, but I could simply read one on learning Spanish and apply some of the same methods to the Finnish language. I have been reading, or at least looking at all I can find on this language for seven years so I do know how it works well enough to get through it, all I need is a method for learning and practicing.

On another note, what I am focusing on? I have all these things that I want to do but there is no one thing that I really focus on during the day. I come home from work and I either go look at my computer all night or look for something that I can do in the house. At best I try to think of new ways to make money or learn something. Tonight I am going to read the book, Brendon Burchard - The Motivation Manifesto. I just got a preview of that and what it shows is that you must say no to most things and focus all of your attention on a single thing in order to move forward.


This is a video from the author of the book. From this I am seeing how much I have been wasting my time trying to do too many things at once. I am going to start reading the book now. I am not sure how much I can learn from it, but we will see how far this gets me.

Saturday, November 7, 2015

I just had an idea: I have been writing posts, making videos and reading articles about programming of all sorts, but it never really occurred to me to just read a book on the subject. I could simply read a book on game programming, make a number of small programs, then assemble each one of these programs into a fairly good game with relatively little effort. However my life habit has always been to look for the shortcuts or the quick fix. I am the kind of person who will gladly work double shifts at work five days a week. Getting just four hours of sleep every night for months at the time is something I am used to do quite often. Because of these events, I have always assumed that this meant that I was a hard worker, but now I am realizing that it is quite the opposite. The reason why I can work harder than anyone else at my job is because the job does not require any thinking. It is all stuff that can be done with habit, and an ability to remain focused on an endless series of simple tasks. With programming there is not simple task, at least not the way I do it. I can write pages of code and just sit there for hours staring at a screen, as long as it is all stuff I already know. I like the idea of finally figuring out a difficult problem, but when I have a long series of problems with no end in sight, the feeling of accomplishment that I anticipate and crave from being able to last a sixteen or eighteen hour shift at work, or the satisfaction of completing a project the way that I want never shows up. I just lose interest, and soon revert to looking for a simpler, quicker way of getting my fix.

I have been reading this book called The Power of Habit by Charles Duhigg, in it it shows that our behaviors are mostly the product of small subconscious actions that are triggered in ways that we do not even notice. I need to break my habit of looking for short cuts and start setting clearly written programming goals. Before long, I need to have a working game. Before that however, I have to write down what I need to do to get there. I think that the problem is the fact that I never really try to plan anything. At my job, all the planning is done for me. I am assigned a task, I do it as best I can, then I get another on. It does not matter how long I have to work, I never need to try to figure out what to do next. At home however, when I need to get something done, my only strategy is to just sit down and try to do it, without a plan. I am accustomed to just figuring out what to do by simply knowing how to do it. But if something comes along that is too big to hold in my head, my only habit is to just push against it, sometimes for years, until I just give up in frustration. Most things are easy if you can break them down into smaller tasks, and then do those tasks one at the time, but I have never learned how to do that. I have tried to break down tasks, but I quickly give up because it is the complete opposite of how I am accustomed to doing things. That is the real power of habits, I just have to push and break my head on every problem I come across. I have been trying to learn the Finnish language for seven years now. I have spent months of my life trying to translate an entire book form Finnish to English. I have read many articles that shows grammar rules and other aspects of the language. I have forced myself to sit down and do all of those things, but I don't remember ever really trying to follow an actual course. I think I have read books on the subject, but really all I ever did was skim across the pages looking for tricks that would help me learn faster. I never really stopped to plan how I was going to approach the language. I am sure that I could have read a book for real, followed a course plan, and be at least functional in the language by now, but I never did any of this. My only habit is to work harder than anyone else, for as long as it takes. Now I need to change everything and learn to work smarter. The plan for now is to read something about programming and practice it exactly, even when all my instincts are telling me to jump ahead. This is going to be the hardest part, to not just feel as if I know enough and just jump in.

Question - How do I Draw a Multiplication table using the JavaScript Canvas.
Answer:
First you create a canvas and a context. To get all the numbers to fit neatly in a grid pattern, we need to calculate the position of each cell, and each number. To make everything look better here I will use a margin and patting to make each cell look like a button. You could also use JQuery or something else to get a better look, but this is just to make code that you can replicate and play with. To draw each cell in the right place, we need a nested for loop for the X and Y axis, rows and columns. It is not important here which loop comes first, we just need one inside the other. Because we are making a multiplication table, we need one row and column than is specified. For example, to show a times table for every number from one to twelve, we would need thirteen rows and thirteen columns. Inside the inner loop, we are drawing each cell. At this point you would only need to draw the number at the center of each cell and you are done, but we need to know where the center of the cell is and where to draw the margins. The code also uses different colors for when a cell in a source number or a result number. Red for a result number and green for a source. Because both the loops count from zero, we identify a source number as when the row or column value is zero and set the colors accordingly. If the number in the cell is not a source, then its value is just the value of the first for loop, multiplied by the value of the second for loop. Now to draw the cell. The starting position of the cell begins with the X and Y values from the two for loops, multiplied by the width and height of each cell. The ending position is those values plus the width and height of each cell. But that is not enough in this case, we now need to calculate the padding and the margins. This is used to show a space between cells and to give the appearance of a raised button. Padding and margin at the top of the cell is achieved by just adding the values from the top of the cell. However, because JavaScript function fillRect in the HTML 5 canvas uses heights and width to draw rectangles, we need to calculate the size of the rectangle by taking into account all the sides of the cell. So the width of the rectangle in the middle of the cell is the width of the cell, minus the padding times two. To calculate for both the padding and margin together, just do the same thing by first adding both values before multiplying them by two and subtracting that from the cell's size. Now that we have our separation between our buttoned cells, it is time to draw the number using the JavaScript canvas methods for text drawing. We first set the font, then we align the text to the center of the the position we provide and set the color to white to make it stand out. Now we draw the number. To convert a number to string in JavaScript, we use the toString method. All numbers and strings are objects with their own methods in JavaScript. To calculate the point where we draw the number, we take the position of the cell plus the size of the cell divided by two to get the center. By that is not enough. Even though we specified that the text should be centered, JavaScript and the canvas only centers horizontally, so that the text is above the center of the cell. To compensate, we add half the height of our font to the center of the cell to get the text centered properly. It is possible to calculate the height of the text on the fly using JavaScript HTML5 canvas methods, but this works differently of each browser and I just don't want to get into that here. The result of this code is a simple looking multiplication table. I have also added code to change the color of cells when the mouse comes inside of them. For this to work however, you will have to remember to update the canvas each time you get the JavaScript onMouseMove event.  Otherwise, the image will not change. The mouse coordinates are for the window, not the image, so we subtract canvas.offsetLeft and canvas.offsetTop to compensate for the position of the HTML5 canvas on the page.

Thursday, November 5, 2015

This is my first post on blogger. I am wondering jut how much I can put in here.
the one on the top is about gravity, the one below is about bouncing balls. They are not of very good quality because I cannot get the capture software to work right.