• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 12:30
CEST 18:30
KST 01:30
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL19] Finals Recap: Standing Tall9HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Weekly Cups (June 30 - July 6): Classic Doubles2[BSL20] Non-Korean Championship 4x BSL + 4x China8Flash Announces Hiatus From ASL66Weekly Cups (June 23-29): Reynor in world title form?14FEL Cracov 2025 (July 27) - $8000 live event22
StarCraft 2
General
The SCII GOAT: A statistical Evaluation The GOAT ranking of GOAT rankings Weekly Cups (June 23-29): Reynor in world title form? Weekly Cups (June 30 - July 6): Classic Doubles Program: SC2 / XSplit / OBS Scene Switcher
Tourneys
RSL: Revival, a new crowdfunded tournament series FEL Cracov 2025 (July 27) - $8000 live event Sparkling Tuna Cup - Weekly Open Tournament WardiTV Mondays Korean Starcraft League Week 77
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 481 Fear and Lava Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma
Brood War
General
Flash Announces Hiatus From ASL SC uni coach streams logging into betting site BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ ASL20 Preliminary Maps
Tourneys
[BSL20] Grand Finals - Sunday 20:00 CET CSL Xiamen International Invitational [BSL20] Non-Korean Championship 4x BSL + 4x China The Casual Games of the Week Thread
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile What do you want from future RTS games? Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Stop Killing Games - European Citizens Initiative Summer Games Done Quick 2024! Summer Games Done Quick 2025!
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Culture Clash in Video Games…
TrAiDoS
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 634 users

The Big Programming Thread - Page 936

Forum Index > General Forum
Post a Reply
Prev 1 934 935 936 937 938 1031 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
January 08 2018 22:51 GMT
#18701
On January 09 2018 04:57 dsyxelic wrote:
has anyone here had a situation where they regret rejecting a perfectly decent looking offer because they are in the interview process/final rounds with companies they like better and would be better for their career?

i might have to do that and am not sure what i will regret more, not taking the risk and finishing up with the other companies or not taking a perfectly fine job. cannot delay deadlines anymore and assume no reneging (its a clusterfuck since it's a coop)


The advice I have always seen is to delay as long as possible, while informing the other companies of your situation.
Excludos
Profile Blog Joined April 2010
Norway8053 Posts
January 08 2018 23:13 GMT
#18702
On January 09 2018 04:35 Nobodyyy wrote:
I need to vent. I am teaching web programming to 3rd year uni students. They had to program a (very basic) web store. It's really really basic, but I swear students are exponentially more stupid than when I was a 3rd year student.

For starters, we didn't learn web programming. There was an introductory course to CS in the first semester of the first year that told you how to do stuff with HTML, JS and CSS (which was still rather new back then) but in the 2nd year there was a software project and the "easy out" was to program a web app. This was back before frameworks were a thing and OOP was definitely not something you did with PHP. In other words, the early 00s and the web apps people had to program for the project were somewhat similar to the assignment in this course. They were considered trivial, and boring, and a surefire way to score a high grade. The complex shit was the AI projects, or there was some supply chain management tool, and some other complex stuff that I don't recall (because it was fucking 15+ years ago).

Skip forward to now. 3rd year students. We can assume they have some fucking idea about how to debug their own code right? Hah. Lol.

Well, exam period has started and we figured the evaluation last year was a farce and we needed to do it a bit different. So we prepared a bunch of really basic programming assignments to do with the web store. Things like:

- Make the login functionality (there are some sample users in the database with password 1234).
- Load page XXXXXX into a div with Ajax (can use jquery).
- Print the content of the shopping cart on the screen, and make a button to empty it.

The skeleton code was neatly programmed and had been used for all the examples throughout the course (which, btw, students ignored and then complained when their own kludged together mess didn't work). The idea was to pass/fail the students without looking at the quality of the code: if it functions, they pass. If it doesn't, they fail. We probably can't do that, because only 5 of the 40 students today managed to create code that passed the bar. Holy ####. After (supposedly) a full semester course in the 3rd!!! year of university, these students can't figure out in an hour how to add a login functionality to a very simple website. Mind. Blown. And we'll probably have to pass more than 10%.

What does this mean for you (or me). Well... that a university degree in CS is essentially useless (note, I do not know about all universities, just the particular unnamed one I am at. My previous experience has been in teaching MSc. level at a different uni in a different country, which was obviously rather different). Honestly, the only reason to pick uni grads instead of kids straight out of high school is because hopefully they have matured a bit in the 3-4 years they spent getting a useless piece of paper.

/rant out.



Well I can understand this if your country of "Afghanistan" is correct..

I have yet to see a CS course which haven't been absolutely brutal wherever I've gone, but I have heard about them. In Japan you're apparently so useless out of school they they barely expect you to be able to print hello world in any language. A friend who lived there told me they instantly bumped him up to a "3 years of experience required" position when he moved there and they realized, coming out of a US university, he actually knew how to program... baffling.
sc-darkness
Profile Joined August 2017
856 Posts
January 08 2018 23:22 GMT
#18703
On January 09 2018 08:13 Excludos wrote:
Show nested quote +
On January 09 2018 04:35 Nobodyyy wrote:
I need to vent. I am teaching web programming to 3rd year uni students. They had to program a (very basic) web store. It's really really basic, but I swear students are exponentially more stupid than when I was a 3rd year student.

For starters, we didn't learn web programming. There was an introductory course to CS in the first semester of the first year that told you how to do stuff with HTML, JS and CSS (which was still rather new back then) but in the 2nd year there was a software project and the "easy out" was to program a web app. This was back before frameworks were a thing and OOP was definitely not something you did with PHP. In other words, the early 00s and the web apps people had to program for the project were somewhat similar to the assignment in this course. They were considered trivial, and boring, and a surefire way to score a high grade. The complex shit was the AI projects, or there was some supply chain management tool, and some other complex stuff that I don't recall (because it was fucking 15+ years ago).

Skip forward to now. 3rd year students. We can assume they have some fucking idea about how to debug their own code right? Hah. Lol.

Well, exam period has started and we figured the evaluation last year was a farce and we needed to do it a bit different. So we prepared a bunch of really basic programming assignments to do with the web store. Things like:

- Make the login functionality (there are some sample users in the database with password 1234).
- Load page XXXXXX into a div with Ajax (can use jquery).
- Print the content of the shopping cart on the screen, and make a button to empty it.

The skeleton code was neatly programmed and had been used for all the examples throughout the course (which, btw, students ignored and then complained when their own kludged together mess didn't work). The idea was to pass/fail the students without looking at the quality of the code: if it functions, they pass. If it doesn't, they fail. We probably can't do that, because only 5 of the 40 students today managed to create code that passed the bar. Holy ####. After (supposedly) a full semester course in the 3rd!!! year of university, these students can't figure out in an hour how to add a login functionality to a very simple website. Mind. Blown. And we'll probably have to pass more than 10%.

What does this mean for you (or me). Well... that a university degree in CS is essentially useless (note, I do not know about all universities, just the particular unnamed one I am at. My previous experience has been in teaching MSc. level at a different uni in a different country, which was obviously rather different). Honestly, the only reason to pick uni grads instead of kids straight out of high school is because hopefully they have matured a bit in the 3-4 years they spent getting a useless piece of paper.

/rant out.



Well I can understand this if your country of "Afghanistan" is correct..

I have yet to see a CS course which haven't been absolutely brutal wherever I've gone, but I have heard about them. In Japan you're apparently so useless out of school they they barely expect you to be able to print hello world in any language. A friend who lived there told me they instantly bumped him up to a "3 years of experience required" position when he moved there and they realized, coming out of a US university, he actually knew how to program... baffling.


I don't think BSc in CS is brutal. It's not trivial but not brutal for sure.
Manit0u
Profile Blog Joined August 2004
Poland17243 Posts
January 09 2018 01:56 GMT
#18704
On January 09 2018 04:39 WarSame wrote:
Show nested quote +
On January 09 2018 01:08 Manit0u wrote:
Not to mention the fact that his authenticity check not only passes around plain password as String but also possible account match is retrieved by using LIKE on email... Also, why would he retrieve encrypted password and salt in two separate queries, when he needs both to check for password match is beyond me.

Hey, thanks for giving me the feedback earlier when I asked for it, rather than waiting to shit on me at some random time.

EDIT: I will actually change the email thing, though. I forgot to clean that up earlier.

How am I supposed to avoid passing the password as plain text? It needs to be put into the text field as plain text, and passed on from there to get encrypted so it needs to get passed around at least a little.

I can't check my code right now but I thought I was retrieving the salt and hash together. I'll look into that. Either way, that's a small efficiency quibble(at least at this point).


Dude, when you asked for advice we told you to learn more about security...

Anyway, I wasn't talking about passing password as plain text. I specifically mentioned a String, which is a class, which is bad for anything that needs to be kept secure/hidden away since you don't have any control over the garbage collector (and why you should use char arrays for that purpose).

Once again, you must really improve your knowledge of security when trying to do anything even remotely related to crypto-whatever (be it -graphy, -currency etc.).

The same goes for retrieving data required to check for password correctness in 2 different queries, functions and places. While not being overly dramatic when it comes to performance, it adds yet another potential point of failure and might pose a security risk. Performance should really be the least of your worries, usually the slower it is (hashing algo for example) the more secure it is.
Time is precious. Waste it wisely.
dsyxelic
Profile Joined May 2010
United States1417 Posts
Last Edited: 2018-01-09 02:07:34
January 09 2018 02:05 GMT
#18705
On January 09 2018 07:51 travis wrote:
Show nested quote +
On January 09 2018 04:57 dsyxelic wrote:
has anyone here had a situation where they regret rejecting a perfectly decent looking offer because they are in the interview process/final rounds with companies they like better and would be better for their career?

i might have to do that and am not sure what i will regret more, not taking the risk and finishing up with the other companies or not taking a perfectly fine job. cannot delay deadlines anymore and assume no reneging (its a clusterfuck since it's a coop)


The advice I have always seen is to delay as long as possible, while informing the other companies of your situation.


Yeah I've already tried my best but no more delays are available and I can't speed up the other companies any more. I have been in close contact with most of them and they said they would try to match my deadlines, but it hasn't worked out.

On January 09 2018 08:22 sc-darkness wrote:
Show nested quote +
On January 09 2018 08:13 Excludos wrote:
On January 09 2018 04:35 Nobodyyy wrote:
I need to vent. I am teaching web programming to 3rd year uni students. They had to program a (very basic) web store. It's really really basic, but I swear students are exponentially more stupid than when I was a 3rd year student.

For starters, we didn't learn web programming. There was an introductory course to CS in the first semester of the first year that told you how to do stuff with HTML, JS and CSS (which was still rather new back then) but in the 2nd year there was a software project and the "easy out" was to program a web app. This was back before frameworks were a thing and OOP was definitely not something you did with PHP. In other words, the early 00s and the web apps people had to program for the project were somewhat similar to the assignment in this course. They were considered trivial, and boring, and a surefire way to score a high grade. The complex shit was the AI projects, or there was some supply chain management tool, and some other complex stuff that I don't recall (because it was fucking 15+ years ago).

Skip forward to now. 3rd year students. We can assume they have some fucking idea about how to debug their own code right? Hah. Lol.

Well, exam period has started and we figured the evaluation last year was a farce and we needed to do it a bit different. So we prepared a bunch of really basic programming assignments to do with the web store. Things like:

- Make the login functionality (there are some sample users in the database with password 1234).
- Load page XXXXXX into a div with Ajax (can use jquery).
- Print the content of the shopping cart on the screen, and make a button to empty it.

The skeleton code was neatly programmed and had been used for all the examples throughout the course (which, btw, students ignored and then complained when their own kludged together mess didn't work). The idea was to pass/fail the students without looking at the quality of the code: if it functions, they pass. If it doesn't, they fail. We probably can't do that, because only 5 of the 40 students today managed to create code that passed the bar. Holy ####. After (supposedly) a full semester course in the 3rd!!! year of university, these students can't figure out in an hour how to add a login functionality to a very simple website. Mind. Blown. And we'll probably have to pass more than 10%.

What does this mean for you (or me). Well... that a university degree in CS is essentially useless (note, I do not know about all universities, just the particular unnamed one I am at. My previous experience has been in teaching MSc. level at a different uni in a different country, which was obviously rather different). Honestly, the only reason to pick uni grads instead of kids straight out of high school is because hopefully they have matured a bit in the 3-4 years they spent getting a useless piece of paper.

/rant out.



Well I can understand this if your country of "Afghanistan" is correct..

I have yet to see a CS course which haven't been absolutely brutal wherever I've gone, but I have heard about them. In Japan you're apparently so useless out of school they they barely expect you to be able to print hello world in any language. A friend who lived there told me they instantly bumped him up to a "3 years of experience required" position when he moved there and they realized, coming out of a US university, he actually knew how to program... baffling.


I don't think BSc in CS is brutal. It's not trivial but not brutal for sure.


Depends where. Some curriculums are absolutely brutal and I'm amazed how some students can both excel at the coursework and do extracurriculars.
TL/SKT
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
January 09 2018 09:22 GMT
#18706
My brother is in his first semester of a CS degree (not pure CS), and their programming workload is so much bigger than what I had to do back then. If they keep up that pace he should do fine in his 3rd year. I'll probably still have to teach him about actual software development since I doubt that they'll learn much about how to design a maintainable piece of software, but at least he'll know how to program.

My CS degree on the other hand... people didn't learn how to program there and they hardly needed to know anything about it. I taught myself on the side. And there certainly was no web programming involved.
If you have a good reason to disagree with the above, please tell me. Thank you.
Hanh
Profile Joined June 2016
146 Posts
January 09 2018 16:00 GMT
#18707
On January 09 2018 04:39 WarSame wrote:
Show nested quote +
On January 09 2018 03:29 Excludos wrote:
I'm more confused to what he's actually trying to do. Why would an app ever require access to a private wallet?

For the app's author to divert your money into his own wallet :-)


Every crypto wallet app has a private wallet unless they delegate to an external client. If done properly, offline signing is safer than trusting some service to manage your keys.

If it was my app, I would use web3j wallet management https://docs.web3j.io/transactions.html#creating-and-working-with-wallet-files
Your app has a receiving address and you can top it off by transferring from your bigger stash.

I don't see the point of the guys who are bashing the security of your app. It seems fine considering that it aims to protect a wallet held on a phone and what they say seems not applicable in this context. I'd look into the fingerprint api that links with the keystore.

How about
1. generate a long random string as the wallet password
2. generate a keypair in the keystore
3. encrypt (1) with (2)
4. store the result in a db
5. link (2) to finger print auth

Excludos
Profile Blog Joined April 2010
Norway8053 Posts
Last Edited: 2018-01-09 16:56:55
January 09 2018 16:55 GMT
#18708
On January 09 2018 08:22 sc-darkness wrote:
Show nested quote +
On January 09 2018 08:13 Excludos wrote:
On January 09 2018 04:35 Nobodyyy wrote:
I need to vent. I am teaching web programming to 3rd year uni students. They had to program a (very basic) web store. It's really really basic, but I swear students are exponentially more stupid than when I was a 3rd year student.

For starters, we didn't learn web programming. There was an introductory course to CS in the first semester of the first year that told you how to do stuff with HTML, JS and CSS (which was still rather new back then) but in the 2nd year there was a software project and the "easy out" was to program a web app. This was back before frameworks were a thing and OOP was definitely not something you did with PHP. In other words, the early 00s and the web apps people had to program for the project were somewhat similar to the assignment in this course. They were considered trivial, and boring, and a surefire way to score a high grade. The complex shit was the AI projects, or there was some supply chain management tool, and some other complex stuff that I don't recall (because it was fucking 15+ years ago).

Skip forward to now. 3rd year students. We can assume they have some fucking idea about how to debug their own code right? Hah. Lol.

Well, exam period has started and we figured the evaluation last year was a farce and we needed to do it a bit different. So we prepared a bunch of really basic programming assignments to do with the web store. Things like:

- Make the login functionality (there are some sample users in the database with password 1234).
- Load page XXXXXX into a div with Ajax (can use jquery).
- Print the content of the shopping cart on the screen, and make a button to empty it.

The skeleton code was neatly programmed and had been used for all the examples throughout the course (which, btw, students ignored and then complained when their own kludged together mess didn't work). The idea was to pass/fail the students without looking at the quality of the code: if it functions, they pass. If it doesn't, they fail. We probably can't do that, because only 5 of the 40 students today managed to create code that passed the bar. Holy ####. After (supposedly) a full semester course in the 3rd!!! year of university, these students can't figure out in an hour how to add a login functionality to a very simple website. Mind. Blown. And we'll probably have to pass more than 10%.

What does this mean for you (or me). Well... that a university degree in CS is essentially useless (note, I do not know about all universities, just the particular unnamed one I am at. My previous experience has been in teaching MSc. level at a different uni in a different country, which was obviously rather different). Honestly, the only reason to pick uni grads instead of kids straight out of high school is because hopefully they have matured a bit in the 3-4 years they spent getting a useless piece of paper.

/rant out.



Well I can understand this if your country of "Afghanistan" is correct..

I have yet to see a CS course which haven't been absolutely brutal wherever I've gone, but I have heard about them. In Japan you're apparently so useless out of school they they barely expect you to be able to print hello world in any language. A friend who lived there told me they instantly bumped him up to a "3 years of experience required" position when he moved there and they realized, coming out of a US university, he actually knew how to program... baffling.


I don't think BSc in CS is brutal. It's not trivial but not brutal for sure.


I'm by far not the smartest person so me getting through it shows that pretty much anyone can with minimal effort. But in our class of 102 people, around 40% dropped out during the first year and an additional 10-20% during the next 2 years (variable because some came back to finish later, and some got IT jobs without finishing which I'm not sure how to count).

And our school was super easy compared to Australia. I studied there for only half a year, and it's to date the most stressful 6 months I've ever done. 40 hours a week just for the assignments alone was the norm, and at one point towards the end I was up to 80 hours (Tho I did take two weeks off to take an actual vacation as well in the middle there, which in hindsight I could have used to catch up).
sabas123
Profile Blog Joined December 2010
Netherlands3122 Posts
January 09 2018 19:10 GMT
#18709
On January 10 2018 01:55 Excludos wrote:
Show nested quote +
On January 09 2018 08:22 sc-darkness wrote:
On January 09 2018 08:13 Excludos wrote:
On January 09 2018 04:35 Nobodyyy wrote:
I need to vent. I am teaching web programming to 3rd year uni students. They had to program a (very basic) web store. It's really really basic, but I swear students are exponentially more stupid than when I was a 3rd year student.

For starters, we didn't learn web programming. There was an introductory course to CS in the first semester of the first year that told you how to do stuff with HTML, JS and CSS (which was still rather new back then) but in the 2nd year there was a software project and the "easy out" was to program a web app. This was back before frameworks were a thing and OOP was definitely not something you did with PHP. In other words, the early 00s and the web apps people had to program for the project were somewhat similar to the assignment in this course. They were considered trivial, and boring, and a surefire way to score a high grade. The complex shit was the AI projects, or there was some supply chain management tool, and some other complex stuff that I don't recall (because it was fucking 15+ years ago).

Skip forward to now. 3rd year students. We can assume they have some fucking idea about how to debug their own code right? Hah. Lol.

Well, exam period has started and we figured the evaluation last year was a farce and we needed to do it a bit different. So we prepared a bunch of really basic programming assignments to do with the web store. Things like:

- Make the login functionality (there are some sample users in the database with password 1234).
- Load page XXXXXX into a div with Ajax (can use jquery).
- Print the content of the shopping cart on the screen, and make a button to empty it.

The skeleton code was neatly programmed and had been used for all the examples throughout the course (which, btw, students ignored and then complained when their own kludged together mess didn't work). The idea was to pass/fail the students without looking at the quality of the code: if it functions, they pass. If it doesn't, they fail. We probably can't do that, because only 5 of the 40 students today managed to create code that passed the bar. Holy ####. After (supposedly) a full semester course in the 3rd!!! year of university, these students can't figure out in an hour how to add a login functionality to a very simple website. Mind. Blown. And we'll probably have to pass more than 10%.

What does this mean for you (or me). Well... that a university degree in CS is essentially useless (note, I do not know about all universities, just the particular unnamed one I am at. My previous experience has been in teaching MSc. level at a different uni in a different country, which was obviously rather different). Honestly, the only reason to pick uni grads instead of kids straight out of high school is because hopefully they have matured a bit in the 3-4 years they spent getting a useless piece of paper.

/rant out.



Well I can understand this if your country of "Afghanistan" is correct..

I have yet to see a CS course which haven't been absolutely brutal wherever I've gone, but I have heard about them. In Japan you're apparently so useless out of school they they barely expect you to be able to print hello world in any language. A friend who lived there told me they instantly bumped him up to a "3 years of experience required" position when he moved there and they realized, coming out of a US university, he actually knew how to program... baffling.


I don't think BSc in CS is brutal. It's not trivial but not brutal for sure.


I'm by far not the smartest person so me getting through it shows that pretty much anyone can with minimal effort. But in our class of 102 people, around 40% dropped out during the first year and an additional 10-20% during the next 2 years (variable because some came back to finish later, and some got IT jobs without finishing which I'm not sure how to count).

Here in The Netherlands, this is our national average for pretty much all studies, and CS is ~50-60%
The harder it becomes, the more you should focus on the basics.
sc-darkness
Profile Joined August 2017
856 Posts
January 09 2018 20:05 GMT
#18710
Do you guys struggle with algorithm questions in interview? Any advice how I can become better? I'm not sure if reading more about algorithms will help. I think I need to improve my thinking on the go instead, but I'm not sure how to achieve that. Would doing non-CS maths help?
Mr. Wiggles
Profile Blog Joined August 2010
Canada5894 Posts
January 09 2018 21:39 GMT
#18711
On January 10 2018 05:05 sc-darkness wrote:
Do you guys struggle with algorithm questions in interview? Any advice how I can become better? I'm not sure if reading more about algorithms will help. I think I need to improve my thinking on the go instead, but I'm not sure how to achieve that. Would doing non-CS maths help?

It depends on what part you're having trouble with, really.

For example, do you find it difficult to identify what the problem is, or what class of algorithms might be applicable? Is it that you can solve the problem quickly, but have trouble with "whiteboard programming"? Knowing where you're having issues would help with providing more applicable advice.
you gotta dance
Excludos
Profile Blog Joined April 2010
Norway8053 Posts
Last Edited: 2018-01-09 21:47:48
January 09 2018 21:44 GMT
#18712
On January 10 2018 05:05 sc-darkness wrote:Would doing non-CS maths help?


Depends on what you consider CS maths. I've had a use for almost all of the math's I've learned through school, CS related or not, but my first job was pretty weird as well. In my current job I've used exactly none of it.

On January 10 2018 05:05 sc-darkness wrote:
Do you guys struggle with algorithm questions in interview? Any advice how I can become better? I'm not sure if reading more about algorithms will help. I think I need to improve my thinking on the go instead, but I'm not sure how to achieve that.


This depends on what you're applying for. Most likely it's in some kind of field you can prepare yourself for. If it's just a regular old frontend job then I wouldn't expect algorithm questions on the interview. If the job is in a scientific field then you should look at what they work with and try to figure out what they might need.

edit: Some things you might get a use for in any job tho would be: sorting (tho you'll probably have tools to do this with), graphs, geometry (especially in games or other 3D related projects), parsing if that counts as an algorithm (which tbh it doesn't), and maybe some good old A* or any other types of path finding.
sc-darkness
Profile Joined August 2017
856 Posts
Last Edited: 2018-01-09 23:51:35
January 09 2018 21:51 GMT
#18713
Well, I had to implement Reverse Polish Notation in an interview. Because of pressure and not reading all requirements carefully, my algorithm was producing wrong output. I had to do it on a piece of paper, so no debugger and IDE. It really annoys me because it's not a difficult thing to do, but then again, pressure, rushing things and having 30-40 minutes to come up with C++ code got me. It's just solving problems like that quickly and on the spot that I want to become better at.

I don't want to memorise algorithms like the one above. I just want to solve them if I spend some time thinking.

Edit: Just implemented it in an OOP way. It's not difficult as I said.. unfortunately, a bit too late. :D

If you're curious, here's code. Note that code could be made prettier, I just focused on some balance of code quality and time to do.

+ Show Spoiler +

Keep in mind there are very few comments. Code was written for myself only.

Operators.h
+ Show Spoiler +


#pragma once

#include <inttypes.h>

enum class Operators : int32_t
{
PLUS,
MINUS,
MULTIPLICATION,
DIVISION,
UNKNOWN
};



ReversePolishCalculator.h
+ Show Spoiler +


#pragma once

#include <inttypes.h>
#include <string>
#include <vector>

enum class Operators : int32_t;

class ReversePolishCalculator
{
public:
ReversePolishCalculator();

double calculate(const std::string& input) const;

private:
std::vector<std::string> parseTokens(const std::string& input) const;
bool parseOperator(const std::string& input, Operators& op) const;
bool parseNumber(const std::string& input, int32_t& number) const;
int32_t applyOperator(int32_t first, int32_t second, Operators op) const;
};



ReversePolishCalculator.cpp
+ Show Spoiler +


#include <sstream>
#include <algorithm>
#include <iterator>
#include <vector>
#include <stack>
#include <exception>
#include <cassert>
#include "ReversePolishCalculator.h"
#include "Operators.h"


ReversePolishCalculator::ReversePolishCalculator()
{
}

double ReversePolishCalculator::calculate(const std::string& input) const
{
std::vector<std::string> tokens(parseTokens(input));
std::stack<double> final_result;

for (const std::string& token : tokens)
{
int32_t temp_number = 0;
Operators temp_op = Operators::UNKNOWN;
if (parseNumber(token, temp_number))
{
final_result.push(temp_number);
}
else if (parseOperator(token, temp_op))
{
if (final_result.size() <= 1)
throw std::logic_error("Stack of numbers is either empty or it has only one number. Can't apply operator.");

int32_t second = final_result.top();
final_result.pop();

int32_t first = final_result.top();
final_result.pop();

int32_t result = applyOperator(first, second, temp_op);
final_result.push(result);
}
}

bool has_one_result = final_result.size() == 1;

if (!has_one_result)
throw std::logic_error("Expected to have only one result");

double the_result = static_cast<double>(final_result.top());
final_result.pop();

return the_result;
}

std::vector<std::string> ReversePolishCalculator::parseTokens(const std::string& input) const
{
std::istringstream iss(input);
std::vector<std::string> tokens{ std::istream_iterator<std::string>{iss},
std::istream_iterator<std::string>{} };

return tokens;
}

bool ReversePolishCalculator::parseOperator(const std::string& input, Operators& op) const
{
bool success = false;

if (input == "+")
{
op = Operators::PLUS;
success = true;
}
else if (input == "-")
{
op = Operators::MINUS;
success = true;
}
else if (input == "*" || input == "x")
{
op = Operators::MULTIPLICATION;
success = true;
}
else if (input == "/")
{
op = Operators::DIVISION;
success = true;
}
else
{
op = Operators::UNKNOWN;
success = false;
}

return success;
}

bool ReversePolishCalculator::parseNumber(const std::string& input, int32_t& number) const
{
int32_t converted_number = 0;

try
{
converted_number = std::stoi(input);

// if we're at this line, no exception has occurred
number = converted_number;

return true;
}
catch (const std::exception&)
{
return false;
}
}

int32_t ReversePolishCalculator::applyOperator(int32_t first, int32_t second, Operators op) const
{
switch (op)
{
case Operators::PLUS:
return first + second;
case Operators::MINUS:
return first - second;
case Operators::MULTIPLICATION:
return first * second;
case Operators::DIVISION:
return first / second;
case Operators::UNKNOWN:
default:
{
throw std::logic_error("Unknown operators");
}
}
}



Example:
ReversePolishCalculator calculator;
double result = calculator.calculate("5 1 2 + 4 * + 3 -");

WarSame
Profile Blog Joined February 2010
Canada1950 Posts
January 10 2018 04:41 GMT
#18714
On January 09 2018 05:46 Excludos wrote:
Show nested quote +
On January 09 2018 05:13 _fool wrote:
On January 09 2018 04:39 WarSame wrote:
Yeah, it seems sketchy which is part of the reason why I have no intention of ever releasing it. However, Android Pay et. al need your CC# and VIN, and this is conceptually similar. Do other wallets have some better way of doing it?


Legit question. I believe online wallets generate a keypair for you, and then you use the web application to tell a 3rd party what you want them to do with your account. Move money to/from the account, etc. In that case, yes, the online party has your private key (and in fact you don't!) so it's all a matter of trust. This is a simple way to get and hold crypto's, but not very safe.

However, users that generate their own public/private keypair usually do so because they do not trust any 3rd party with their keypair, and they want to be safe. It makes no sense for them to generate their own pair, then supply it to you so you can use it to do transactions on their behalf.

Long story short: I think the technical solution will work, but I think the user base for such an app would be small.


You nailed it. If you want to do any kind of trading, there are tons of exchanges online with their own wallets, which lets you access their API with generated keys to let you build third party aps for (In fact, I'm doing that very same thing right now). People who make private wallets are those who, and rightly so, are afraid of getting hacked and/or having their coins/tokens stolen. These people are not going to make a lot of trades both because it's against their interest (they just want to sit on the coins and collect interest over a long period of time), and because trading through network transactions instead of in an exchange is expensive. They have no use for a third party app to do it with.

But then they still have to trust the exchanges. There's still trusting a third party at some point. I'm planning on looking into if you can do something similar with Light Clients on Android so you don't need to use any non-Ethereum Foundation software to safely do this.

On January 09 2018 10:56 Manit0u wrote:
Show nested quote +
On January 09 2018 04:39 WarSame wrote:
On January 09 2018 01:08 Manit0u wrote:
Not to mention the fact that his authenticity check not only passes around plain password as String but also possible account match is retrieved by using LIKE on email... Also, why would he retrieve encrypted password and salt in two separate queries, when he needs both to check for password match is beyond me.

Hey, thanks for giving me the feedback earlier when I asked for it, rather than waiting to shit on me at some random time.

EDIT: I will actually change the email thing, though. I forgot to clean that up earlier.

How am I supposed to avoid passing the password as plain text? It needs to be put into the text field as plain text, and passed on from there to get encrypted so it needs to get passed around at least a little.

I can't check my code right now but I thought I was retrieving the salt and hash together. I'll look into that. Either way, that's a small efficiency quibble(at least at this point).


Dude, when you asked for advice we told you to learn more about security...

Anyway, I wasn't talking about passing password as plain text. I specifically mentioned a String, which is a class, which is bad for anything that needs to be kept secure/hidden away since you don't have any control over the garbage collector (and why you should use char arrays for that purpose).

Once again, you must really improve your knowledge of security when trying to do anything even remotely related to crypto-whatever (be it -graphy, -currency etc.).

The same goes for retrieving data required to check for password correctness in 2 different queries, functions and places. While not being overly dramatic when it comes to performance, it adds yet another potential point of failure and might pose a security risk. Performance should really be the least of your worries, usually the slower it is (hashing algo for example) the more secure it is.

Do you honestly think "go learn security" is even advice at all? It's a recommendation at most. Further, one of the best ways to learn is by doing and making mistakes. I posted my code and asked for feedback. I got none. So thanks for that.

Literally never heard of that char array/garbage collection concern before but I'll look into it.

And this is the road to improvement.

On January 10 2018 01:00 Hanh wrote:
Show nested quote +
On January 09 2018 04:39 WarSame wrote:
On January 09 2018 03:29 Excludos wrote:
I'm more confused to what he's actually trying to do. Why would an app ever require access to a private wallet?

For the app's author to divert your money into his own wallet :-)


Every crypto wallet app has a private wallet unless they delegate to an external client. If done properly, offline signing is safer than trusting some service to manage your keys.

If it was my app, I would use web3j wallet management https://docs.web3j.io/transactions.html#creating-and-working-with-wallet-files
Your app has a receiving address and you can top it off by transferring from your bigger stash.

I don't see the point of the guys who are bashing the security of your app. It seems fine considering that it aims to protect a wallet held on a phone and what they say seems not applicable in this context. I'd look into the fingerprint api that links with the keystore.

How about
1. generate a long random string as the wallet password
2. generate a keypair in the keystore
3. encrypt (1) with (2)
4. store the result in a db
5. link (2) to finger print auth


I actually was using their wallet for a bit, but was having trouble with it and decided to strip it out and put a simpler version in. I'll look into what you mentioned. Thank you for the information and leads.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Silvanel
Profile Blog Joined March 2003
Poland4725 Posts
January 10 2018 09:10 GMT
#18715
So if anyone is intrested Mercedes (our customer) has unvailed some parts of the software i am working on. You can watch the show here: https://media.mercedes-benz.com/CES2018/media-special
Pathetic Greta hater.
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
January 10 2018 09:51 GMT
#18716
That's really quite cool man, congrats to be working in that industry. Mind if I ask the pathway you took to getting there?
Silvanel
Profile Blog Joined March 2003
Poland4725 Posts
January 10 2018 10:43 GMT
#18717
I was referred by friend of mine already working for a company and passed an interview for a tester. Intially i didnt know much about programming and CS (but had knowledge of testing just in different area). I learned a lot since. Company helped me grew. Right now i am automating tests but started as manual tester. Here (in my company) You can go from manual testing to automation or developing if You want and show skills.

Also regarding referals thats prefered method of recruitment (that and headhunters) in that particular location of my company. Dont know about other locations. Also as SW company we work in many areas not only for automotive (soundspeakers, maps, updates, cameras etc.)

Getting here as a developer is actualy pretty easy You just need to know C or C++ (for hardware) or Java (for servers, maps, OTA updates) and be willing to work in Poland. We are recruiting like crazy. Of course there are also jobs in US,Germany, India but i dont know details there.
Pathetic Greta hater.
Hanh
Profile Joined June 2016
146 Posts
January 10 2018 11:45 GMT
#18718
On January 10 2018 13:41 WarSame wrote:
Do you honestly think "go learn security" is even advice at all? It's a recommendation at most. Further, one of the best ways to learn is by doing and making mistakes. I posted my code and asked for feedback. I got none. So thanks for that.


Let's call it a strong recommendation. Making mistakes in security is not a good way to learn. Either:
1. your project doesn't require much security. You mess up and there is no consequence. You didn't learn anything because no one cared enough to attack your system and it seemed to work.
2. your project requires strong security. You mess up and it's a shit storm. Lots of people are angry.

See, ... you can't get it right. It's just too hard. They tell you to learn about security because you should have an idea of how difficult it is. If you are not, then let's hope that what you do does not need to be secure.

Coursera has a course Cryptography I which is quite good. And there are plenty of books too.
Excludos
Profile Blog Joined April 2010
Norway8053 Posts
January 10 2018 17:00 GMT
#18719
On January 10 2018 20:45 Hanh wrote:
Show nested quote +
On January 10 2018 13:41 WarSame wrote:
Do you honestly think "go learn security" is even advice at all? It's a recommendation at most. Further, one of the best ways to learn is by doing and making mistakes. I posted my code and asked for feedback. I got none. So thanks for that.


Let's call it a strong recommendation. Making mistakes in security is not a good way to learn. Either:
1. your project doesn't require much security. You mess up and there is no consequence. You didn't learn anything because no one cared enough to attack your system and it seemed to work.
2. your project requires strong security. You mess up and it's a shit storm. Lots of people are angry.

See, ... you can't get it right. It's just too hard. They tell you to learn about security because you should have an idea of how difficult it is. If you are not, then let's hope that what you do does not need to be secure.

Coursera has a course Cryptography I which is quite good. And there are plenty of books too.


I should point out that pretty much every company on earth has at one point taken security too lightly, messed up, and gotten into a huge shitstorm because of it. Difference is if it happens after you've gotten big you can usually take the hit and hire a bunch of cryptography experts to make sure it never happens again. That's what google did to turn themselves from a vulnerable company to what's probably the most it-secure company on earth.

That said it would make your life and conscience a lot better if you just took it seriously to begin with. It's a very difficult subject to learn tho, and constantly evolving too. It can be difficult for an amateur to just "go an learn it". In the prototype stage it might be just as easy to forgo it completely, and rather hire someone to do it once you've secured fundings. Unless you plan on releasing it yourself, In which case: Don't. It's entirely possible to be personally accountable for losing other people's money if you purposely made and released an app you knew wasn't secure enough.
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
January 10 2018 22:51 GMT
#18720
On January 10 2018 20:45 Hanh wrote:
Show nested quote +
On January 10 2018 13:41 WarSame wrote:
Do you honestly think "go learn security" is even advice at all? It's a recommendation at most. Further, one of the best ways to learn is by doing and making mistakes. I posted my code and asked for feedback. I got none. So thanks for that.


Let's call it a strong recommendation. Making mistakes in security is not a good way to learn. Either:
1. your project doesn't require much security. You mess up and there is no consequence. You didn't learn anything because no one cared enough to attack your system and it seemed to work.
2. your project requires strong security. You mess up and it's a shit storm. Lots of people are angry.

See, ... you can't get it right. It's just too hard. They tell you to learn about security because you should have an idea of how difficult it is. If you are not, then let's hope that what you do does not need to be secure.

Coursera has a course Cryptography I which is quite good. And there are plenty of books too.

Sure, but I'm making mistakes in an unreleased app and asking for feedback. That seems like an ideal security learning, right? The problem is I didn't get specific feedback on security when I originally asked for it. I got scorched for having improper security rather than getting feedback. Then you and a few others gave me good, specific, actionable feedback, which helped quite a bit.

I understand security is difficult. I understand why you need professionals. If this were an enterprise app I would obviously hire professionals, but this is just for learning.

Taking a course is a good recommendation, but I think the time invested to reward of that would be minimal for me.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Prev 1 934 935 936 937 938 1031 Next
Please log in or register to reply.
Live Events Refresh
RotterdaM Event
16:00
Rotti Stream Rumble 4k Edition
RotterdaM443
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 762
RotterdaM 443
Hui .357
MaxPax 334
StarCraft: Brood War
Bisu 1941
EffOrt 1308
Flash 1304
Jaedong 1180
Hyuk 821
Stork 371
actioN 369
Soulkey 276
Soma 275
Snow 187
[ Show more ]
firebathero 175
Mind 98
JulyZerg 71
TY 69
sSak 64
Barracks 57
Sharp 50
JYJ46
Terrorterran 45
PianO 43
Rock 31
HiyA 21
Aegong 20
soO 16
yabsab 15
GoRush 11
Shine 8
IntoTheRainbow 7
Dota 2
Gorgc6615
qojqva3321
League of Legends
singsing2289
Dendi1253
Counter-Strike
fl0m1143
markeloff176
Super Smash Bros
Mew2King204
Other Games
hiko1544
Beastyqt844
ceh9366
Lowko307
crisheroes263
ArmadaUGS149
KnowMe140
Trikslyr62
Organizations
Other Games
gamesdonequick47269
StarCraft 2
angryscii 21
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• Reevou 7
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Michael_bg 2
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Nemesis6915
• TFBlade833
• Jankos802
Other Games
• Shiphtur316
Upcoming Events
Replay Cast
7h 30m
Sparkling Tuna Cup
17h 30m
WardiTV European League
23h 30m
MaNa vs sebesdes
Mixu vs Fjant
ByuN vs HeRoMaRinE
ShoWTimE vs goblin
Gerald vs Babymarine
Krystianer vs YoungYakov
PiGosaur Monday
1d 7h
The PondCast
1d 17h
WardiTV European League
1d 19h
Jumy vs NightPhoenix
Percival vs Nicoract
ArT vs HiGhDrA
MaxPax vs Harstem
Scarlett vs Shameless
SKillous vs uThermal
uThermal 2v2 Circuit
1d 23h
Replay Cast
2 days
RSL Revival
2 days
ByuN vs SHIN
Clem vs Reynor
Replay Cast
3 days
[ Show More ]
RSL Revival
3 days
Classic vs Cure
FEL
3 days
RSL Revival
4 days
FEL
4 days
FEL
4 days
BSL20 Non-Korean Champi…
5 days
Bonyth vs QiaoGege
Dewalt vs Fengzi
Hawk vs Zhanhun
Sziky vs Mihu
Mihu vs QiaoGege
Zhanhun vs Sziky
Fengzi vs Hawk
Sparkling Tuna Cup
5 days
RSL Revival
5 days
FEL
5 days
BSL20 Non-Korean Champi…
6 days
Bonyth vs Dewalt
QiaoGege vs Dewalt
Hawk vs Bonyth
Sziky vs Fengzi
Mihu vs Zhanhun
QiaoGege vs Zhanhun
Fengzi vs Mihu
Liquipedia Results

Completed

BSL Season 20
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Jiahua Invitational
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025

Upcoming

2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
CSL Xiamen Invitational
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.