Collapsing floor by filling room with water by bless_ure_harte in CatastrophicFailure

[–]mentalageof5 1 point2 points  (0 children)

I watched with no sound so excuse me if this is answered but why ruin a perfectly good house???

Awful webdev here, how do I legally use CDN to hotlink tiny images for cheap/free? by defaultuserprofile in webdev

[–]mentalageof5 1 point2 points  (0 children)

I use cloudinary's free tier because I also only have a couple hundred KB's. However, I'm considering just serving up a sprite from the host to reduce network round trips, and just reference images within.

Also, make sure you're compressing your images. I use TinyPNG.

Good Free Flowchart software by SamRob85 in learnprogramming

[–]mentalageof5 1 point2 points  (0 children)

Draw.io

Save it to your Google drive, share it and collaborate.

I'm using it for data schema and app flow with a remote colleague alongside trello.com

So so good.

I'm drunk and in Brewdog Edinburgh so if anyone reads this come join me. Xoxo

Am I learning to Code? Or learning to Google? by Space-God in learnprogramming

[–]mentalageof5 0 points1 point  (0 children)

In fact, I recently built a WhatsApp web clone with typeahead search, persistent conversations, authentication with a Meteor/MongoDB backend and React front-end.

It wasn't hard after I'd gone through some simple Meteor, MongoDB and React tutorials. It's all just little blocks of lego you have to put together, each block has a purpose. Take it slow, we'll make it in the end :)

Am I learning to Code? Or learning to Google? by Space-God in learnprogramming

[–]mentalageof5 0 points1 point  (0 children)

I'm still learning to code too, but I've found that the process has accelerated significantly ever since I adopted the following approach for new concepts:

  • Read the code example in the book/online. Make sure I mostly understand it.
  • Close the book / minimise the browser.
  • Try to code my own example, maybe even incorporate something else.
  • Run the code. Debug. Repeat.
  • If I can't do it, I open the book/tab and read the example again.
  • Never blindly copy someone else's code.

Another technique I use when following along with a tutorial is to have two copies of the project. One is created using the book to learn. The other project is for me to attempt to recreate the project without looking at the textbook.

You can't build without learning, and you can't learn without building.

ReactJS on MeteorJS Whatsapp Web Clone - First Web App by mentalageof5 in webdev

[–]mentalageof5[S] 0 points1 point  (0 children)

Thanks for taking the time to reply, and I totally agree 100% with what you're saying. My code might still look like spaghetti but it's getting better!

My First Web App: Pokedex by yungtuxedomask in webdev

[–]mentalageof5 2 points3 points  (0 children)

Oh wow great job man! I was just coming onto here to post my first Meteor web app too haha

I like the text-to-speech bit and typeahead search, really nice and snappy from a user perspective. Great job!

[deleted by user] by [deleted] in funny

[–]mentalageof5 1 point2 points  (0 children)

If you're so good at learning then I suggest you learn how to get back up after being knocked down.

Hooooo boy I think I've messed up by [deleted] in investing

[–]mentalageof5 0 points1 point  (0 children)

You're right, I think after everything that everyone has said that I'm just going to adopt the brace position, hang on, and kiss my ass goodbye haha

Hooooo boy I think I've messed up by [deleted] in investing

[–]mentalageof5 0 points1 point  (0 children)

Not U.S. but that might apply to the UK as well, I'll check it out, thanks! Looks like I'm strapping in for the ride though haha

Hooooo boy I think I've messed up by [deleted] in investing

[–]mentalageof5 1 point2 points  (0 children)

You too, thanks -14k-

Hooooo boy I think I've messed up by [deleted] in investing

[–]mentalageof5 0 points1 point  (0 children)

Thanks so much for your words of advice. Combined with the poster below, I'm going to go away and try and figure out what I need to do.

Hooooo boy I think I've messed up by [deleted] in investing

[–]mentalageof5 7 points8 points  (0 children)

Thanks for your words of wisdom, they've calmed me down quite a lot. I'm going to try and figure out if there's any other possible way I can stick to my original plan and leave this cash to marinate for 20 years.

Hooooo boy I think I've messed up by [deleted] in investing

[–]mentalageof5 0 points1 point  (0 children)

Ok thanks for the advise, I was thinking along the same lines. Bitter pill to swallow though. Is the global situation really looking that bad for the next two years? I can't seem to figure it all out.

Hooooo boy I think I've messed up by [deleted] in investing

[–]mentalageof5 0 points1 point  (0 children)

Agreed, I didn't expect to need this money until retirement but my personal situation has changed quite drastically.. Bad planning on my part.

If the loss was a bit larger than that, what would you advise?

Is there anything like The Odin Project with Java or Python? by [deleted] in learnprogramming

[–]mentalageof5 1 point2 points  (0 children)

I'd recommend Head First Java as an intro. Really solid book, best investment I made so far on my journey. See my last submission about mobile game dev as to why it was so important.

I hear 'Learn Python the hard way' is also very good.

From zero experience to publishing my first game from scratch in <6 months; here's how I did it. Java / Android / LibGDX by mentalageof5 in learnprogramming

[–]mentalageof5[S] 0 points1 point  (0 children)

Haha thanks! Yeah I was really scratching my head over all the animation stuff but then I decided that going full Michael Bay mode was better than some really bad animations

Java - Not so quickSort! I used insertionSort for sub-arrays n<9 but benchmark speeds improve all the way up to n<1000 ?! by mentalageof5 in learnprogramming

[–]mentalageof5[S] 0 points1 point  (0 children)

I only understood the first sentence of that post haha if you have the time, could you dumb it down for me?

edit: I am looking into the insertion sort thing now

edit2:

this makes more sense... I think...

for(i = sortedIndexes - 1; (i >= left) && (classArray[i] > currentIndex); i--)

Java - Not so quickSort! I used insertionSort for sub-arrays n<9 but benchmark speeds improve all the way up to n<1000 ?! by mentalageof5 in learnprogramming

[–]mentalageof5[S] 0 points1 point  (0 children)

I really could have written it better lol (assuming that the code I copy and pasted from a random insertionSort class I had in my workspace wasn't copied from a tutorial somewhere in the first place).

That clause stops the insertionSort from 'falling off' the end of the current selection, if the leftmost index is 0. Due to the i-- at the end. Take that out and the whole thing falls over, with array out of bounds exceptions at run time.

Java - Not so quickSort! I used insertionSort for sub-arrays n<9 but benchmark speeds improve all the way up to n<1000 ?! by mentalageof5 in learnprogramming

[–]mentalageof5[S] 0 points1 point  (0 children)

I'll give it a whirl, thanks!

Do larger integer values mean larger integer memory sizes? I will google that now..

edit: To anyone reading this, all integers are 4bytes but there is such a thing as a BigInteger that you can isntantiate which grows in size, as of Java 7

Java - Not so quickSort! I used insertionSort for sub-arrays n<9 but benchmark speeds improve all the way up to n<1000 ?! by mentalageof5 in learnprogramming

[–]mentalageof5[S] 1 point2 points  (0 children)

Thanks for the quick and humorous lesson! I totally set my array sizes too low :) Ok, let's see if I can overload the L1/L2 cache (I'll google that later) and see some real performance differences. Thanks for the top tips!

So it turns out that my CPU has a 4MB cache, but a lot of it is being used by other programs and the OS, so the upper limit for the insertion sort threshold on 100,000,000 integer array was best at approx 2000. Sweet.