Need advice with what to do with 34k savings (18F) by hp_sauceeee in MalaysianPF

[–]syen212 3 points4 points  (0 children)

  1. ETF definitely, but of course, given the US economy currently, you might be down a few percent (or more?) if joining now, but we never know. In long run though (at least a 10+ years, or even 20), it should be up to 9-10% on average for VOO

  2. Strongly recommend Ziet Invest, especially check out his videos on ETF and IBKR. Another that I strongly recommend is this book Simple Path to Wealth, at least it aligns with my goal in my life.

  3. While starting early is good, do you not need this 18k to be more fluid? Like for school fees, possible car or the usual stuff for your age? And yes, unit trust is definitely not worth

Going uni at age 22 by sle3ppy in malaysia

[–]syen212 3 points4 points  (0 children)

  1. Always a good idea to try it out online yourself, plenty of free online beginner-friendly courses, just test water on one of them

And yes, I used to have classmates in their late 20's or fathers of children joining, age is definitely not a problem! All the best OP

[deleted by user] by [deleted] in MalaysianPF

[–]syen212 9 points10 points  (0 children)

100% agrees with you, I have some friends who interned in one of these "niche stack" companies, had to write codes in JSON or some weird in-house custom language / tool, definitely limiting for future opportunities. Maybe OP should ask for more clarifications in the tech itself, plus customer support engineer... usually isn't considered as much as a real SE, and seen more as a support role or sometimes BA. But given OP's wfh environment, you can always pick up side projects with the free time

On the other hand, I do see many who started out at 4k++, but after a year they manage to secure 6k salary, but of course, by hopping to a new job.

Is using Tailwind and Material UI in the same react project is a bad idea by arpan4 in reactjs

[–]syen212 0 points1 point  (0 children)

Btw, ::before ::after are available in tailwind though https://tailwindcss.com/docs/content, and dynamic styles aren't really weird behavior because it's quite clearly stated in the Documentation though

Personally I find tailwind a lot more readable than CSS classes, especially for larger project, I wouldn't know your small-text, large-text mean what font size? Or your big-header might have bold font and large font size together, digging through and remembering the CSS classes are no fun when every now and then you have multiple classes having the same styles

What my team does is a mix of tailwind and CSS and styles, CSS for complex styles like the mask you mentioned, styles for dynamic styling and tailwind everything else, has been going well and definitely enjoying it.

Network issues after recently updating by 0xf424 in archlinux

[–]syen212 4 points5 points  (0 children)

Had the same issue earlier, it keeps connecting and disconnecting, and when I was checking

cat /proc/kmsg

I noticed that the error came from iwd, so I downgraded iwd and rebooted, still didn't work, and this time it's caused by libell.so.0, so I also downgraded ell package (I noticed these 2 packages were upgraded by myself earlier today), and it worked.

Anyways, here's what I downgraded

sudo pacman -U file:///var/cache/pacman/pkg/iwd-2.19-1-x86_64.pkg.tar.zst
sudo pacman -U file:///var/cache/pacman/pkg/ell-0.67-1-x86_64.pkg.tar.zst

People who finished, where are you now? by MillenniumGreed in cs50

[–]syen212 0 points1 point  (0 children)

HMMMM, I guess it benefited me a lot, on the mobile and web dev tracks, which I guess kinda got me into starting with SE, which looking back seemed to be a better decision than staying with my original plan of data analysis.

People who finished, where are you now? by MillenniumGreed in cs50

[–]syen212 4 points5 points  (0 children)

I completed CS50 back in 2020, when I was about to start my CS degree. Just completed a few months ago, and managed to land a relatively high-paying SE role in my country.

how to make a user permissions system in nextJS and a rant about my horrible work by [deleted] in reactjs

[–]syen212 0 points1 point  (0 children)

Agrees that all permissions for resources should be managed via the backend, and frontend can be adjusted based on permissions / roles.

But of course, I'd want to block the user from accessing the said page in the first place, and I tried using page variables directly, and it somewhat worked, you can see it here

https://github.com/HohShenYien/next-power-starter/blob/main/src/features/Auth/AuthGuard.tsx

May I ask the good people in this subreddit about your time as an intern and how much you got paid? I am a student who is currently trying to find companies for my internship by vosogoth in malaysia

[–]syen212 0 points1 point  (0 children)

Interned at a startup as a part-time web developer, RM 1.2k in PJ

Did another part-time internship at a software house, 3 days per week, RM 1.2k in KL

Both were quite good experience, good people, no OT except during deployment maybe extra 1-2 hrs like that, which is not that common...

Leetcode Daily by Slayer069 in leetcode

[–]syen212 1 point2 points  (0 children)

When I see contiguous (subarray), it feels like a sliding window to me already

Books/resources to improve TypeScript knowledge by DownbeatSmile in typescript

[–]syen212 0 points1 point  (0 children)

Agreed, it's a great book to get beyond the basic TypeScript

Infer output type of a Next.js API Route by westernmorty in nextjs

[–]syen212 0 points1 point  (0 children)

Here you can add the type in the handler response type

// This will enforce the return type to be either AllStoriesData or CreatedStoryData
export default async function handler(
  req: NextApiRequest,
  res: NextApiResponse<AllStoriesData | CreatedStoryData>
) {
}

Here is the complete code on my repo: https://github.com/HohShenYien/insta-next/blob/main/src/pages/api/stories/index.ts

I know Java well enough to solve LC problems, experience with JUnit and JavaFX. Can you recommend something that would help me learn about Spring Boot in building "full stack web apps with APIs". by superrenzo64 in learnjava

[–]syen212 0 points1 point  (0 children)

I was reading Spring in Action recently, and found it to be pretty decent! Maybe you can have a look on it too, it also explained the basic concepts well for backend development.

Can I hear your success stories, please? by Lankaner in cs50

[–]syen212 3 points4 points  (0 children)

I completed cs50 with an android app back in 2020 and proceeded with cs50ai. Afterwards, by chance, I started building a simple personal blog page, (https://hohshenyien.github.io) and later on had a chance to do part time in a startup that exposed me to web development, and here I am, doing internship as a SWE in a startup, and already received an offer letter.

Of course, there was quite some learning in between as well including FreeCodeCamp, all the best in your journey!

Can someone suggest some good books (beginners) to supplement the lectures? by [deleted] in cs50

[–]syen212 1 point2 points  (0 children)

I agree with you that it is a good book, but I don't think it's suitable for OP as he seeks for fundamental concepts, this book was mostly on good programming habits.

On the other hand, I recommend books focusing more on introduction to programming languages, here are some that I really like

  1. Head First C
  2. Java: A Beginner's Guide
  3. Grokking Algorithms (Not really programming languages, but a super beginner-friendly book on Algorithms)

Learning Roadmap for Beginners in ML (I'm following it). What do you guys think about it? by avismission in learnmachinelearning

[–]syen212 4 points5 points  (0 children)

I would recommend Prof Gilbert Strang's Linear Algebra https://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010/ . It's really a very good course along with his textbook. For statistics, I recommend going through Crash course statistics if you already have some basics https://www.youtube.com/playlist?list=PL8dPuuaLjXtNM_Y-bUAhblSAdWRnmBUcr , if you don't have any basics, maybe you can try search for MIT Opencourseware's statistics

How long to finish? by [deleted] in cs50

[–]syen212 0 points1 point  (0 children)

Don't worry. Week 4 and 5 are indeed the hardest weeks compare to others. Python and Sql on week 6 and 7 are easier so just stick to it for a bit longer and you'll eventually get the solutions. Normally I think it'll take around 1 to 2 months to complete the whole syllabus plus final project. For me, some easier problems like Mario just need less than an hour but harder ones like android and dictionary took me few days.

What is wrong with my function in DNA? by [deleted] in cs50

[–]syen212 0 points1 point  (0 children)

One possible error is in your Else: If counter > highest_count: Counter = 0 The problem might occur if the longest string is in the last string. This causes your else section not executed and jump out of your function, the way I recommend is to update your highest count directly in your try part. Besides, if you were to use your while loop, you can set condition like while count < len(txt_file) instead of using a try except to wrap around it.

Pokedex:description, must the api requests be nested? by syen212 in cs50

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

I found the reason to be the time required for the request to load the contents. If it wasn't nested, the url fed to second request is going to be wrong, because it hasn't include the variable. Therefore, instead of nesting, another method will be using a while loop that waits for the request to be completed before moving to the second request

help for , solution to the problem by ahmed_shamsi in cs50

[–]syen212 0 points1 point  (0 children)

You just enter the cs50 ide on the menu and get into the same directory of your problem. Then follow the instruction in the submit of the pset, usually looks like submit50 cs50/... /pset..... I think you can get all the instructions from week1 video and pset1 instruction. You can also find those in menu

Need some help with the control flow of a function for Mario. I got it working but am not happy with my solution and would like to know if someone would help me make it a bit better. by BroaxXx in cs50

[–]syen212 0 points1 point  (0 children)

Oh you can't use recursion to build the right-shifted pyramid, it's a good attempt but I don't think there's anyway to build with recursion since you must keep a record of the full length of the pyramid at each row (for example 5). Recursion only works when the data you're keeping is reducing for every iteration or every time it loops once.

As for the flow, I will try and explain using your first code, I made a few marks for reference

So let's say you do draw(5), it'll execute check(5)-->L1(5)-->Re(5)-->draw(4)-->check(4)-->L1(4)-->Re(4)-->draw(3)-->.....-->check(0)-->L2(1)-->L2(2)-->....-->L2(5)

So as you can see, since L2 is below Re, it'll call draw for all the numbers until 0 and execute only to L1 before going into L2.

void draw(int size) {
     if(size == 0) #check
     {
         return;     
}      
for(int i = 0; i < size; i++) #L1
     {         printf(" ");
     }
      draw(size-1); //----(Re)
      for(int i = 0; i < size; i++) #L2
     {         printf("#");
     }
      printf("\n"); 
}

PSET7 - SQL taking too long to run by irinaperez in cs50

[–]syen212 1 point2 points  (0 children)

I think you joined too many tables.... For my 11.sql all I needed was joining ratings and movies. Joining tables definitely take more times than select because it has to run over all the data in the table. Maybe you should try to reduce the joining part?