Posts

Showing posts from April, 2021

15/04/2021 - git workflow

Image
sync checkout new branch track track view modification/discard changes sync upload request merge in provider i used gitlab so i could clone via their online GUI apparently git does not have the concept of sub branch, all branches are equal, when merge, it compares 2 branches the idea to isolate your changes stems from creating a new branch

14/04/2021 - coding for android

interning as a startup android studio and gradle sucks i hate testing out my react-native code. testing out code for reactjs was a breeze emulator is really slow in a professional context, having to deal with git which is painful to use it was really dumb i am still copying my code to a alternate file as a backup plan google is your best friend, humans aren't able help you much if the answer is not short, which it often isnt you have to tutor and watch videos yourself boss who seems to chase after features tbh, the target group is not defined, content is not defined  i am analysing this is a niche social app so it needs niche content,  even instagram offers something different to facebook right it might be easier to just copy features from the most popular apps  heck, even youtube sports tiktok rip offs these days learning wise, mobile is a terrible place to start for newbies  it is better to start off in vanilla js and then react.  only once you have learnt all, then refactor the

11/04/2021 - multer-s3, i hate open offices

i am due to start my full time internship tomorrow. i am feeling kind of sad and depressed. sad because i miss my carefree unemployed time. depressed because i cant stand hotdesking and open offices. that i will be holed in a tiny room and distracted constantly because i actually need at least a half height cubicle to work else i cannot stand the lack of privacy. i shall try to brainwash myself no one is looking at me. sure to be a painful torture. hope i make it out. not being able to achieve sustained focus is quite depressing for me. bloody hell, can i wear blinders. ok, so i will need to bathe, charge my phone, pack my giant bottle, pack some ginseng, and a shawl. ok, so i tweaked  https://www.udemy.com/course/mern-ecommerce/ to include multer-s3 if you reached the heroku deploy parts, you will find heroku filesystem is ephemeral https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted i saw some people mentioning multer-s3 in the comments.  took me long enough.

10/04/2021 - how do you include a person who is not eloquent

u noe i struggle to include my dad when there's my mum, its kinda dysfunctional dunno how to handle my dad sometimes. he w interrupt and disrupt when me and mum talking to shut us up, make dumb comments that invite scolding from my mum, in the background mumble or leave out words,  or go off topic, which means the listener has to work hard to comprehend what he means and raise their voice to get him to repeat i tink his behaviour is someone who feels left out, i tried telling him so many times at least speak clearly and not jump from topic to topic. when hes like that to keep him happy that i have listen to him talk but its pretty one sided. like satisfy his need for verbal stimulation but its not enjoyable for me i dont usually bend backwards just to keep him happy because i feel he should work on his skills its better when its juz one to one cos he doesnt have competition form my mum who is better conversationalist so he can talk all he wants and get the attention today he oso ve

08/04/2021 - someone whose words cut

dealing with friends who speak out of turn and make backhanded comments i have a certain kind of expectation for a 30 year old woman working mother as opposed to a 50-60 year single woman who has been unemployed literally her whole life have this friend who is like that.  how i reason this out, is that she is not aware of the social skills of - not interrupting, not speaking out of turn, not being aware when her comments sound like backhanded compliments. i dont think she will get into trouble when we meet, since we seldom meet, and when we meet we are mostly talking about her. and i know she is like that since i knew her. it has taken on an evolved flavor during the recent years and her comments are snarkier.  i am amazed nobody has told her certain of her actions are insufferable and unaware. i have not yet done an observation is it only me she speaks to like that but seriously i don't think i want to go down that crazy inducing road to investigate and cause myself emotional grie

07/04/2021 - done with course

i am done with the 20 vanilla web mini projects why is coding kind of exhausting sometimes. i get really bad text neck since my posture sucks. also done with the react native crash course. need to familiarise with the react native components, and the styling specificities. other than that it seems the same. i am glad react hooks is used.

06/04/2021 - react-native setup on windows and vscode

Image
tutorial https://www.youtube.com/watch?v=Hf4MJH0jDb4 docs https://reactnative.dev/docs/environment-setup error JAVA_HOME is not set and no 'java' command could be found in your PATH. cause user variable were set via the control panel but the system variable not in sync, had to set as admin in command prompt solution https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html dependencies for windows java sdk (same version as the jre within the android sdk folder), android has the jre but lacks the jdk android studio (android runs on java) paths and windows environment variable must be set and then you can use the react-native cli on vscode command prompt terminal choco install -y nodejs.install openjdk8 browser search and install android studio android studio app > config>sdk manager> sdk> check for android 10 q else add control panel pane set ANDROID_HOME, the url is inside the sdk manager command prompt terminal set JAVA_HOME, it shoul

05/04/2021 - graphql server

Image
this is the javascript nodejs express server side implementation i wanted something similar very close to just nodejs only and no apollo to avoid adding packages but majority of tutorials on the net use apollo purpose of graphql implementation agnostic, flexible easier to do more complicated queries self documenting what you see if what you get reduce proliferation of endpoints client side can define their own data api so graphql will add a layer of customisation help you do joins and nested queries reading sdl/ast/syntax/language -  https://graphql.org/learn/ schemas and types queries and mutations js implementation -  https://graphql.org/graphql-js/ running express and graphql clients youtube tutorial applying the above https://www.youtube.com/watch?v=Vs_CBxCfFHk express-graphql npm file structure for backend your server file express-graphql, graphhttp schema file gql tag or template strings resolver file plain js functions or you might even want to split up the schemas or resolvers

03/04/2021 - finding prime numbers

during a phone interview recently, i was how would i use javascript to find prime numbers below a a certain integer. so far i have seldom touched javascript algorithms. only dabbled in python machine learning. but that is looking at other people's code. i am feeling really insecure until i can solve the problem, even though the employer passed my feeble attempt. here's the solution  See the Pen prime number algo by wly185 ( @wly185 ) on CodePen . use a for loop, other methods like map and filter seems to crash use for .. of to iterate through the array values  i added a break statement because i wanted to stop if the number was divisible and not search anymore, on to the next number filter out even numbers and number divisible by 5 (ends with 5 and zeros) to reduce the array length to generate an array, use array(integer) and fill(0) => an array with all zeros => map value to key index +1

02/04/2021 - for if else loop javascript common errors, drag and drop and displace/shift

Image
 javascript is not the best in terms of error reporting. mysterious errors that you only know by experience and recall.  if else within for loops -silent errors that hijack your if-else  specificity - most specific condition, then the more general ones  type error - string instead of number use console.log typeof to check your args  equality operators do not confuse = with === one is an assignment operator the other is a comparison operator i dont know why both sides equality does not apply here, had to use the && operator     test your code with console.log i for each condition check the i-s and the sequence, does it match what you expect beware of nesting See the Pen sortable list by wly185 ( @wly185 ) on CodePen . original code by  https://github.com/bradtraversy/vanillawebprojects/blob/master/sortable-list/script.js i tweaked the code so that the drag and drop would displace/shift the list items the drag and drop api events dragstart your drag event functionali

02/04/2021 - some feelings of trepidation

treated my fam to dinner.  quite nervous, feeling some trepidation about starting work again after 1year 3 months of unemployment. to be specific, its the part about social anxiety but i really have to fake it and quash those feelings of insecurity and uncertainty. these days i feel a sense of relief that a piece of the puzzle that is my career direction seems to be filled.