• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 17:56
CET 23:56
KST 07:56
  • 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
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
RSL Season 3: RO16 results & RO8 bracket13Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge2[TLMC] Fall/Winter 2025 Ladder Map Rotation14Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA15
StarCraft 2
General
Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge SC: Evo Complete - Ranked Ladder OPEN ALPHA RSL Season 3: RO16 results & RO8 bracket RSL Season 3 - Playoffs Preview Mech is the composition that needs teleportation t
Tourneys
RSL Revival: Season 3 $5,000+ WardiTV 2025 Championship StarCraft Evolution League (SC Evo Biweekly) Constellation Cup - Main Event - Stellar Fest 2025 RSL Offline Finals Dates + Ticket Sales!
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death
Brood War
General
2v2 maps which are SC2 style with teams together? Data analysis on 70 million replays BGH Auto Balance -> http://bghmmr.eu/ soO on: FanTaSy's Potential Return to StarCraft A cwal.gg Extension - Easily keep track of anyone
Tourneys
[BSL21] RO16 Tie Breaker - Group B - Sun 21:00 CET [BSL21] RO16 Tie Breaker - Group A - Sat 21:00 CET [Megathread] Daily Proleagues Small VOD Thread 2.0
Strategy
Current Meta Game Theory for Starcraft How to stay on top of macro? PvZ map balance
Other Games
General Games
Path of Exile Nintendo Switch Thread Should offensive tower rushing be viable in RTS games? Clair Obscur - Expedition 33 Stormgate/Frost Giant Megathread
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread The Games Industry And ATVI Things Aren’t Peaceful in Palestine About SC2SEA.COM
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread Korean Music Discussion
Sports
Formula 1 Discussion 2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
The Health Impact of Joining…
TrAiDoS
Dyadica Evangelium — Chapt…
Hildegard
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1782 users

The Big Programming Thread - Page 992

Forum Index > General Forum
Post a Reply
Prev 1 990 991 992 993 994 1032 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.
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
January 25 2019 16:04 GMT
#19821
Well I did say temp tables with indexes. I didn't say anything about the source tables. I say that speaking from someone who has been in similar situations. If you can narrow down your scope somewhat, you can take a large slice from the source and put it into a temp with proper indexing. Of course, I don't know the type of query he'll be running. I was mostly being facetious.
Silvanel
Profile Blog Joined March 2003
Poland4733 Posts
Last Edited: 2019-01-26 13:46:33
January 26 2019 08:40 GMT
#19822
On January 25 2019 23:31 Acrofales wrote:
Show nested quote +
On January 25 2019 08:20 Manit0u wrote:
On January 25 2019 01:24 enigmaticcam wrote:
On January 24 2019 18:32 Manit0u wrote:
https://www.theregister.co.uk/2019/01/22/google_chrome_browser_ad_content_block_change/

Edit:

Heh, I got myself into a nice mess... Got a task of investigating some users missing rewards for the ads they've watched. We have over 4.5 billion users in our db and there have been 2.7 billion reward attempts this month.

Time to put my SQL goggles on.

Temp tables with indexes!


I work for a company that has the biggest mysql db in europe and due to traffic and response times requirements they got rid of stuff like indices and shit (with large enough tables indices slow you down).

I'm in the 20-30 minute wait to discover this was not the query you were looking for territory...

Why don't you take a slice, figure out the query you want on the slice, and then once you got it mostly debugged, execute it on the full DB? There'll probably still be some bugs due to weird corner cases that weren't in your slice, but at least you won't have to wait 20-30 minutes *every* time you want to test a query.


That is exactly same question i wanted to ask. I dont know anything about databases but this is generally a known problem (not only in computer science). If a data set is too large You slice it down and and analyse smaller chunks. Is there a good reason why You cant do that for databases?
Pathetic Greta hater.
Manit0u
Profile Blog Joined August 2004
Poland17450 Posts
January 26 2019 14:16 GMT
#19823
On January 26 2019 17:40 Silvanel wrote:
Show nested quote +
On January 25 2019 23:31 Acrofales wrote:
On January 25 2019 08:20 Manit0u wrote:
On January 25 2019 01:24 enigmaticcam wrote:
On January 24 2019 18:32 Manit0u wrote:
https://www.theregister.co.uk/2019/01/22/google_chrome_browser_ad_content_block_change/

Edit:

Heh, I got myself into a nice mess... Got a task of investigating some users missing rewards for the ads they've watched. We have over 4.5 billion users in our db and there have been 2.7 billion reward attempts this month.

Time to put my SQL goggles on.

Temp tables with indexes!


I work for a company that has the biggest mysql db in europe and due to traffic and response times requirements they got rid of stuff like indices and shit (with large enough tables indices slow you down).

I'm in the 20-30 minute wait to discover this was not the query you were looking for territory...

Why don't you take a slice, figure out the query you want on the slice, and then once you got it mostly debugged, execute it on the full DB? There'll probably still be some bugs due to weird corner cases that weren't in your slice, but at least you won't have to wait 20-30 minutes *every* time you want to test a query.


That is exactly same question i wanted to ask. I dont know anything about databases but this is generally a known problem (not only in computer science). If a data set is too large You slice it down and and analyse smaller chunks. Is there a good reason why You cant do that for databases?


We did use slices, but even those had billions of records in them since the problem at hand was so vague that we didn't really know what we were looking for and had to gradually narrow it down.
In any case, it turned out that we most likely do not have data in the db that could solve the issue so we went back to the drawing board. This now means more reverse engineering for me since no one at the company really knows how the system is working (they fired all the people who created it 2 years ago) so I have to figure it out for them based on the code alone (stuff I'm dealing with now either has no documentation or docs are so outdated that are essentially worthless).
Time is precious. Waste it wisely.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
January 27 2019 08:24 GMT
#19824
Did they also fire the person responsible for firing those devs without ensuring that their knowledge is not lost? Even from a pure business perspective, that sounds like a terrible decision.
If you have a good reason to disagree with the above, please tell me. Thank you.
Manit0u
Profile Blog Joined August 2004
Poland17450 Posts
January 28 2019 09:55 GMT
#19825
On January 27 2019 17:24 spinesheath wrote:
Did they also fire the person responsible for firing those devs without ensuring that their knowledge is not lost? Even from a pure business perspective, that sounds like a terrible decision.


You don't have to tell me. They've fired 35 people, then discovered that they might still need developers so they hired me and one other guy in their place...
Time is precious. Waste it wisely.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
January 28 2019 17:23 GMT
#19826
Digging my schedule for this semester. Abstract algebra, elementary theory of computation(studying runtimes), cryptology, intro to deep learning
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
January 28 2019 19:08 GMT
#19827
On January 29 2019 02:23 travis wrote:
Digging my schedule for this semester. Abstract algebra, elementary theory of computation(studying runtimes), cryptology, intro to deep learning

These are all the classes I would love to take if I actually had time to go back to school.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
January 29 2019 16:02 GMT
#19828
Does Go have a promising future? Which looks better on a resume for someone interested in ML, being fluent in python and Go, or being fluent in python and R?

Basically, I have a class where all the assignments are in whatever language I want. So I want to learn something new. R or Go?
Excludos
Profile Blog Joined April 2010
Norway8196 Posts
January 29 2019 16:06 GMT
#19829
On January 30 2019 01:02 travis wrote:
Does Go have a promising future? Which looks better on a resume for someone interested in ML, being fluent in python and Go, or being fluent in python and R?

Basically, I have a class where all the assignments are in whatever language I want. So I want to learn something new. R or Go?


For ML? R for sure. Together with Python those are the two most used languages within the field.
Broetchenholer
Profile Joined March 2011
Germany1947 Posts
January 29 2019 16:24 GMT
#19830
hey guys, quick question concerning JSON objects from SQL. I have a SQL query that does not return a field value, it's an Exists query. Something like this:

"SELECT EXISTS(SELECT * FROM soldstock WHERE gameId = ? AND stockId = ?)"

it returns 0 or 1 depending on the condition and the actual return value is something like

"[RowDataPackage { "SELECT EXISTS(SELECT * FROM soldstock WHERE gameId = ? AND stockId = ?)":0}]

I now convert this to JSON and then i could theoretically access it with result[0]['SELECT EXISTS(SELECT * FROM soldstock WHERE gameId = ? AND stockId = ?)']. Which is ridiculous. Is there an easier way for this? Can i name the result of my query in SQL?
tofucake
Profile Blog Joined October 2009
Hyrule19159 Posts
January 29 2019 16:31 GMT
#19831
use the fetchSingleScalar() method (or equivalent) that your PDO library uses
Liquipediaasante sana squash banana
Broetchenholer
Profile Joined March 2011
Germany1947 Posts
January 29 2019 16:49 GMT
#19832
Hm, i am using node.js and a google search does not give me back anything useful on a method that would do this. Any additional help is greatly appreciated
tofucake
Profile Blog Joined October 2009
Hyrule19159 Posts
January 29 2019 17:49 GMT
#19833
you can try to alias the exists instead, then
Liquipediaasante sana squash banana
Manit0u
Profile Blog Joined August 2004
Poland17450 Posts
Last Edited: 2019-01-29 19:37:08
January 29 2019 19:36 GMT
#19834
Why not just convert the hash into an array of results?


const keys = Object.keys(myHash);

let values = keys.map(function(v) { return myHash[v]; });


Unrelated:



Some good tips in there.
Time is precious. Waste it wisely.
Broetchenholer
Profile Joined March 2011
Germany1947 Posts
January 30 2019 12:57 GMT
#19835
Thanks, i tried those two options and decided to not use any logic on my SQL requests for now, just get every row with matching primary key and then use my existing logic in js to get the information i need. Probably horribly ineffective, but rewriting my whole server logic to use more efficient db requests is postponed for the tidying up phase.
Lmui
Profile Joined November 2010
Canada6216 Posts
January 30 2019 17:52 GMT
#19836
On January 30 2019 01:24 Broetchenholer wrote:
hey guys, quick question concerning JSON objects from SQL. I have a SQL query that does not return a field value, it's an Exists query. Something like this:

"SELECT EXISTS(SELECT * FROM soldstock WHERE gameId = ? AND stockId = ?)"

it returns 0 or 1 depending on the condition and the actual return value is something like

"[RowDataPackage { "SELECT EXISTS(SELECT * FROM soldstock WHERE gameId = ? AND stockId = ?)":0}]

I now convert this to JSON and then i could theoretically access it with result[0]['SELECT EXISTS(SELECT * FROM soldstock WHERE gameId = ? AND stockId = ?)']. Which is ridiculous. Is there an easier way for this? Can i name the result of my query in SQL?


Late to the party but agreed on aliases - https://www.w3schools.com/sql/sql_alias.asp
You could also do SELECT <column> in the subquery instead of select *. The database should optimize it as you don't use the result of * but better to be explicit.

I personally always delegate anything I can to the database. It's far more efficient at crunching data than your JS app since people smarter than you or me have done a lot of research into making it quick at getting data back.
Manit0u
Profile Blog Joined August 2004
Poland17450 Posts
Last Edited: 2019-01-31 14:15:25
January 31 2019 10:43 GMT
#19837
[image loading]

Edit:

In other news, one company posted some ridiculous demands by their programmers. They got the new guy a starter kit:
MacBook Pro, iPhone Xs 256GB, magic mouse and keyboard. He was unhappy because they got it in silver instead of space gray so they had to send it back and order again...

Bonus:

https://vim-adventures.com/
Time is precious. Waste it wisely.
Silvanel
Profile Blog Joined March 2003
Poland4733 Posts
January 31 2019 14:38 GMT
#19838
Since i am now running our teams testlab and one person just left our company i will be participating in a interviews for hiring new people. First time being on that side of interview i am already quite nervous! Tips?
Pathetic Greta hater.
Manit0u
Profile Blog Joined August 2004
Poland17450 Posts
January 31 2019 14:59 GMT
#19839
On January 31 2019 23:38 Silvanel wrote:
Since i am now running our teams testlab and one person just left our company i will be participating in a interviews for hiring new people. First time being on that side of interview i am already quite nervous! Tips?


Just remember people on the other side will be more nervous than you most of the time. Try to ask broad, general questions rather than super specifics (unless required by the position). This should give you a general idea if a person is knowledgeable enough to perhaps find the correct solution on the web if they don't know out of hand.
Time is precious. Waste it wisely.
Lmui
Profile Joined November 2010
Canada6216 Posts
Last Edited: 2019-01-31 17:27:39
January 31 2019 17:26 GMT
#19840
On January 31 2019 23:59 Manit0u wrote:
Show nested quote +
On January 31 2019 23:38 Silvanel wrote:
Since i am now running our teams testlab and one person just left our company i will be participating in a interviews for hiring new people. First time being on that side of interview i am already quite nervous! Tips?


Just remember people on the other side will be more nervous than you most of the time. Try to ask broad, general questions rather than super specifics (unless required by the position). This should give you a general idea if a person is knowledgeable enough to perhaps find the correct solution on the web if they don't know out of hand.


Entry level, I ask questions based on projects and try to assess their ability to learn. Probably 90% of new grads will be comfortable in one language, and have familiarity with one more. This means I just assess their existing technical ability, and then try and judge their ability/willingness to learn.

I'm not senior enough to interview/assess people other than entry level.

Agreed with Manit0u, try to ask questions around how they resolve problems.

ex.
When working on the project X you mentioned in the resume, what were the biggest challenges you came across and how did you resolve them.
Could you tell me about a time where you didn't know how to perform a task, but learned something in order to do it? Describe.

Depending on how they answer, you can dive deeper.

It's always weird being an interviewer when you're new. Where I work, we try to have 3 people in the interview,1 manager, 2 technical interviewers and an optional 4th shadow. Anyone can shadow, whether junior, intern or senior engineer because it's useful to learn different interviewing styles and see what works for you. I shadowed something like 4 different people interviewing before I actually did my first one, and I found that super helpful in getting comfortable with it. Some people like very rigid structured interviews, and others prefer to start from one or two questions and expand out from there ad-hoc.
Prev 1 990 991 992 993 994 1032 Next
Please log in or register to reply.
Live Events Refresh
BSL 21
20:00
RO16 TieBreaker - Group B
StRyKeR vs Artosis
OyAji vs KameZerg
ZZZero.O447
LiquipediaDiscussion
IPSL
20:00
Ro16 Group C
StRyKeR vs OldBoy
Sziky vs Tarson
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
White-Ra 293
JuggernautJason127
StarCraft: Brood War
Calm 2736
ZZZero.O 447
Dota 2
LuMiX1
Heroes of the Storm
Khaldor313
Other Games
Grubby6012
FrodaN2155
Mlord552
B2W.Neo338
Pyrionflax191
Maynarde80
Organizations
Other Games
EGCTV1949
gamesdonequick979
BasetradeTV43
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• davetesta84
• Hupsaiya 65
• HeavenSC 28
• musti20045 28
• Kozan
• Migwel
• AfreecaTV YouTube
• sooper7s
• intothetv
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• Airneanach28
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota21055
• Ler103
League of Legends
• Doublelift2459
Other Games
• imaqtpie1567
Upcoming Events
OSC
4m
CranKy Ducklings6
OSC
10h 4m
Wardi Open
13h 4m
Monday Night Weeklies
18h 4m
OSC
1d
Wardi Open
1d 13h
Replay Cast
2 days
Wardi Open
2 days
Tenacious Turtle Tussle
3 days
The PondCast
3 days
[ Show More ]
Replay Cast
4 days
LAN Event
4 days
Replay Cast
5 days
Replay Cast
5 days
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

Proleague 2025-11-21
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
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.