Sidebar Menu

Projects

  • Dashboard
  • Research Project
  • Milestones
  • Repository
  • Tasks
  • Time Tracking
  • Designs
  • Forum
  • Users
  • Activities

Login

  • Login
  • Webmail
  • Admin
  • Downloads
  • Research

Twitter

Posts by stumathews
Stuart Mathews
  • Home
  • Blog
  • Code
  • Running
  • Gaming
  • Research
  • About
    • Portfolio
    • Info

Life is a game of choices.

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
04.Feb
04 February 2017
Last Updated: 04 February 2017
Hits: 2938

I wasn’t feeling too hot yesterday so I checked in sick. Slept most of the day and by the end of it, my back was sore because of how I slept – who knew that sleeping and rest could be so detrimental though in all honesty, it was good to rest up. I had a bit out of it since this run which seemed to coincide with something in the universe that slowed me right down, I don't know why but I think its because I been just doing way too much stuff and needed to rest. Sometimes as hard as it is, you need to stop, force yourself to stop else you will burn out.

Apart from that, I did go to the gym today however and i feel a lot better because of it – obviously I didn’t run/gym yesterday. In other news, I watched Donald Trump in action on youtube and thats pretty entertaining – especially as he exposes the biased and dishonest nature of the media at large – which I’ve always had a problem with. Remember this? For that I praise the guy for his determination and effort to expose it. The jury is out on all his other policies however but the guy’s growing on me honestly – if only for his, well frankness. So sue me, right?

Working on a few flaws in my word counting algorithm yesterday, which get exposed under Windows – Linux seems to handle the flaw well. Basically my unit test was failing and the problem was that I was doing some pointer arithmetic wrong – easily happens in C – probably why people tend to say that C is brutal because well it is. C# on the other hand or most other higher languages would be like ‘no, don't do that, don't move forward, don't collect £200 – sort that out now!’. C is like, ‘whatever man, you know what you’re doing right, you’re elite now right, you write C now? ok go for it”.

C is badass.

Here is what I did wrong, forget the other changes – that's just refactoring:

void STR_GetWordN(const char *s, unsigned int n, char* word)
 {
     int wc = 0;
-    for(int i=0;i<strlen(s);i++)
+    printf("input string is '%s'\n",s);
+    for(int c=0;c<strlen(s);c++)
     {
-        if(isspace(s[i])) continue;
+        if(isspace(s[c])) continue;
         wc++;
-        while(!isspace(s[i])&&i<strlen(s)) {
+        do {
             if(wc==n) {
-                *word = s[i];
+                *word = s[c];
                 word++;
             }
-            i++;
-        }
+            c++;
+        }while(!isspace(s[c])&&c<strlen(s));
         if(wc==n) {
-            word = '\0';
+            *word = '\0';
             return;
         }
     }

I also figured that I could make this function shorter but nevermind that, lets get it working first – right Dennis Richie?

I took out a book on SQL the other day, – haven’t even read the first chapter. That tells me one thing for sure – take it back you don't want to read it. Rule #1 is to trust yourself.

I installed Visual Studio 2015 on my tablet yesterday, that took up 15GB of space – can you believe it. Long gone are they days it took up like 500MB. I want to develop more on my tablet because its lighter than my laptop and I love my laptop though.

I’m in this vortex in space and time right now where I’m not sure who I like the most right now Linux or Windows – I just like them both and that’s kind of a tough place to be because you can’t devote all your time to the one. Time is running out and you’ve got two options, I hate that. Linux to me is like the admirably, honest and loyal friend and windows is the boss that everyone likes including you. Go figure.

Life is a game of choices.

super powers

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
19.Jan
19 January 2017
Last Updated: 23 January 2017
Hits: 2980
  • Random
  • Wierd

I wear reading glasses. Not all the time though - only when I’m reading or working on the computer because I’ve got an astigmatism that makes my brain work harder when I try and focus on seeing things, especially small things – like small fonts and stuff. For instance, my one eye has got the astigmatism while the other is fine and by brain tries to workout the differences between the two eye’s interpretation of any picture, kinda like a 2-way merge process and because this process can be fairly process-intensive over a long period, I can get tired. That’s roughly how the optometrist explained it to me – I made up the bit about the 2-way merge though… So for studying or reading, I tend to get really tired and I’ve been known to just quit or fall asleep!

I don’t really realise how useful they are until I put them on and details become high-def, and then high-def really has a meaning. The other day I sat behind a woman on the bus and she was reading a book, I glanced over hear shoulder momentarily but couldn’t read/see what she was reading – put my specs on, any I could, even from where I was sitting behind her, make out large portions of her storybook – which I think was in polish, or some other foreign language. My sight was acute enough to make out that it wasn’t English. Pretty impressive. I’m like superman with x-ray vision, ok its not that but it feels like a super power at times.

I don't run with them or anything like that, and I’ve never needed them – I’ve done without them for the best part of 30 years. My normal vision is pretty good and I’m not going to be reading any books while I wiz-by the sidewalk. I also like to wear them when I watch tv and movies – like on Sunday I watched the new Underworld film, which is about the war between Werewolves and Vampires(btw: It got bad reviews on rotten tomatoes but I enjoyed it)

Been reading C# in a nutshell 2nd edition to and from work most days (that's why I had to put on my specs when I was in the bus behind that woman btw). I’m rather enjoying it – reading that is and not what other people in front of me is reading, but the c# book, duh!

Diffie Hellman

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
07.Nov
07 November 2016
Last Updated: 07 November 2016
Hits: 2835

I learned about asymmetrical and symmetrical algorithms this weekend. It was quite interesting. The topics I covered included basic and digest authentication including hashing algorithms. I also did some reading about digital certificates and digital signatures. Those last two always confused me.

A particularly interesting topic was the Diffie Hellman algorithm which made sense to me for the first time in a long time. The idea behind it being able to generate a symmetrical key, which is a key that can decrypt cipher text and encrypt plaintext but here is the kicker: you can generate this key which both parties become aware of even though you’ve never met each other before. So you can generate a “shared” key and communicate that between parties over an insecure medium. Thats pretty amazing. You basically use asymmetric encryption(to generate the shared symmetrical key) to begin with, then you drop down in to using symmetrical encryption, and use the key for the remainder of the casual communication from that point onwards. Symmetrical encryption using symmetrical keys is which is faster and more efficient.  

Also learnt that about TLS – never quite knew that TLS is really just the name of the many version of SSL.

Apart from that, I watched the Accountant which left me feeling like a secret agent for the rest of the Sunday.

More Articles …

  1. Lotsa luck
  2. Fear, wonder, speculation and drama
  3. Rush hour tube
  4. Time creep
  5. Selfish perhaps
  6. Dead lives
  7. Big blue and little red
  8. Namibia
  9. Off on holiday
  10. Complex software relationships
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50

Page 46 of 182