• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 19:16
CET 01:16
KST 09:16
  • 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 - 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[ASL20] Finals Preview: Arrival13
Community News
[TLMC] Fall/Winter 2025 Ladder Map Rotation13Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7
StarCraft 2
General
[TLMC] Fall/Winter 2025 Ladder Map Rotation Mech is the composition that needs teleportation t RotterdaM "Serral is the GOAT, and it's not close" RSL Season 3 - RO16 Groups C & D Preview TL.net Map Contest #21: Winners
Tourneys
RSL Revival: Season 3 Sparkling Tuna Cup - Weekly Open Tournament Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 500 Fright night Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ FlaSh on: Biggest Problem With SnOw's Playstyle What happened to TvZ on Retro? SnOw's ASL S20 Finals Review BW General Discussion
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET
Strategy
PvZ map balance Current Meta Simple Questions, Simple Answers How to stay on top of macro?
Other Games
General Games
Path of Exile Clair Obscur - Expedition 33 Should offensive tower rushing be viable in RTS games? Stormgate/Frost Giant Megathread Nintendo Switch Thread
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
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread About SC2SEA.COM Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Canadian Politics Mega-thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2148 users

The Big Programming Thread - Page 1027

Forum Index > General Forum
Post a Reply
Prev 1 1025 1026 1027 1028 1029 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.
Manit0u
Profile Blog Joined August 2004
Poland17435 Posts
December 03 2020 08:24 GMT
#20521
Unfortunately I'm a total noob with excel but I think someone here might be able to help you.

My recent forays into Rust have been OK so far but I'm noticing some weird things when it comes to the language.


// if you have a method call and this method returns a result that can be error etc.
// the compiler will complain that you have not handled it
struct.call();

// if you don't care about the result at the time of calling (don't want to handle errors
// at this stage) and you don't want the compiler to complain you have to do stuff
// like that
let _ = struct.call();


Ugly as hell...
Time is precious. Waste it wisely.
Silvanel
Profile Blog Joined March 2003
Poland4733 Posts
Last Edited: 2020-12-03 09:07:33
December 03 2020 09:07 GMT
#20522
On December 03 2020 16:15 JumboJohnson wrote:
Idk if this is really the spot for it but I don't want to make a new thread and my google-fu is failing me.

I have an excel spreadsheet that I use to track my debt. I have it set up to add the column up and when I add a month I can just drag the cell over and it puts the sum equation under the new column.

What I want to do is put a cell under that takes the sum above and subtracts it from the cell to its left. The equation is obviously easy enough but I can't just drag it over like I do with the sum when I add a new month. What am I missing?

Thanks for any help and sorry it's not a more interesting problem like you all normally discuss :D


I am not sure o understand. Can You post equation You are using?
I suspect You have problem with fact that when You copy formulas the range of the sum stays fixed. So if You have in one cell a formula that sums for example five cells and then copy it to next cell it still will still sum five cells (but diffrent as adresses will change but not range). Am i getting this right? Or this is something else?
Pathetic Greta hater.
mahrgell
Profile Blog Joined December 2009
Germany3943 Posts
December 03 2020 09:46 GMT
#20523
On December 03 2020 17:24 Manit0u wrote:
Unfortunately I'm a total noob with excel but I think someone here might be able to help you.

My recent forays into Rust have been OK so far but I'm noticing some weird things when it comes to the language.


// if you have a method call and this method returns a result that can be error etc.
// the compiler will complain that you have not handled it
struct.call();

// if you don't care about the result at the time of calling (don't want to handle errors
// at this stage) and you don't want the compiler to complain you have to do stuff
// like that
let _ = struct.call();


Ugly as hell...


I have no idea what is there to complain about that.
I really wish our C++ code at work had this. (And adding [[nodiscard]] to all success values in the code base is sadly not possible.)
Manit0u
Profile Blog Joined August 2004
Poland17435 Posts
December 03 2020 11:56 GMT
#20524
On December 03 2020 18:46 mahrgell wrote:
Show nested quote +
On December 03 2020 17:24 Manit0u wrote:
Unfortunately I'm a total noob with excel but I think someone here might be able to help you.

My recent forays into Rust have been OK so far but I'm noticing some weird things when it comes to the language.


// if you have a method call and this method returns a result that can be error etc.
// the compiler will complain that you have not handled it
struct.call();

// if you don't care about the result at the time of calling (don't want to handle errors
// at this stage) and you don't want the compiler to complain you have to do stuff
// like that
let _ = struct.call();


Ugly as hell...


I have no idea what is there to complain about that.
I really wish our C++ code at work had this. (And adding [[nodiscard]] to all success values in the code base is sadly not possible.)


I guess my example wasn't clear enough

Imagine having to do that:


let _ = st.set_id(1);
let _ = st.set_name("my obj");

// I wan't to just call the setters and validate at the end...
Time is precious. Waste it wisely.
JumboJohnson
Profile Joined December 2011
537 Posts
Last Edited: 2020-12-03 16:40:58
December 03 2020 16:37 GMT
#20525
On December 03 2020 18:07 Silvanel wrote:
Show nested quote +
On December 03 2020 16:15 JumboJohnson wrote:
Idk if this is really the spot for it but I don't want to make a new thread and my google-fu is failing me.

I have an excel spreadsheet that I use to track my debt. I have it set up to add the column up and when I add a month I can just drag the cell over and it puts the sum equation under the new column.

What I want to do is put a cell under that takes the sum above and subtracts it from the cell to its left. The equation is obviously easy enough but I can't just drag it over like I do with the sum when I add a new month. What am I missing?

Thanks for any help and sorry it's not a more interesting problem like you all normally discuss :D


I am not sure o understand. Can You post equation You are using?
I suspect You have problem with fact that when You copy formulas the range of the sum stays fixed. So if You have in one cell a formula that sums for example five cells and then copy it to next cell it still will still sum five cells (but diffrent as adresses will change but not range). Am i getting this right? Or this is something else?


I think you've got it. Here's a better description. In column H for example I'd put =G12-H12 and I'd get the number I'm looking for. I just can't get the equation to drag over into column I or G and change the inputs. It just keeps the original numbers.
AiurZ
Profile Blog Joined May 2004
United States429 Posts
December 04 2020 01:57 GMT
#20526
On December 04 2020 01:37 JumboJohnson wrote:
Show nested quote +
On December 03 2020 18:07 Silvanel wrote:
On December 03 2020 16:15 JumboJohnson wrote:
Idk if this is really the spot for it but I don't want to make a new thread and my google-fu is failing me.

I have an excel spreadsheet that I use to track my debt. I have it set up to add the column up and when I add a month I can just drag the cell over and it puts the sum equation under the new column.

What I want to do is put a cell under that takes the sum above and subtracts it from the cell to its left. The equation is obviously easy enough but I can't just drag it over like I do with the sum when I add a new month. What am I missing?

Thanks for any help and sorry it's not a more interesting problem like you all normally discuss :D


I am not sure o understand. Can You post equation You are using?
I suspect You have problem with fact that when You copy formulas the range of the sum stays fixed. So if You have in one cell a formula that sums for example five cells and then copy it to next cell it still will still sum five cells (but diffrent as adresses will change but not range). Am i getting this right? Or this is something else?


I think you've got it. Here's a better description. In column H for example I'd put =G12-H12 and I'd get the number I'm looking for. I just can't get the equation to drag over into column I or G and change the inputs. It just keeps the original numbers.

Without being able to look at it, it sounds like you're using fixed references to cells ie $G$12 etc. instead of relative ones.
picture of dogs.jpg
JimmyJRaynor
Profile Blog Joined April 2010
Canada17007 Posts
Last Edited: 2020-12-11 19:52:59
December 11 2020 19:50 GMT
#20527
.NET 5 is turning about to be solid. so the .NET Core beta test is finally over.
https://weblog.west-wind.com/posts/2020/Nov/24/Upgrading-to-NET-Core-50

Anyone who has got 1000s of hours of coding time with c# is breathing a sigh of relief.


If only i could pick up my biz and move it to Hawaii.
twitter.com
Ray Kassar To David Crane : "you're no more important to Atari than the factory workers assembling the cartridges"
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
December 14 2020 08:33 GMT
#20528
For anyone who likes this kind of thing, adventofcode.com is up for 2020. Finally completed all available problems today.
Manit0u
Profile Blog Joined August 2004
Poland17435 Posts
December 14 2020 14:59 GMT
#20529
On December 14 2020 17:33 enigmaticcam wrote:
For anyone who likes this kind of thing, adventofcode.com is up for 2020. Finally completed all available problems today.


Sometimes I'm so damn lazy...

+ Show Spoiler [super shitty code for task 2] +


def random_res(ary)
nums = [ary.sample, ary.sample, ary.sample]

return random_res(ary) if nums.uniq.count < 3
return nums
end

def answer(ary)
uniq_ary = ary.uniq

loop do
res = random_res(uniq_ary)

return res.reduce(:*) if res.sum == 2020
end
end


puts answer(report)

Time is precious. Waste it wisely.
JimmyJRaynor
Profile Blog Joined April 2010
Canada17007 Posts
December 14 2020 19:15 GMT
#20530
On December 14 2020 23:59 Manit0u wrote:
Show nested quote +
On December 14 2020 17:33 enigmaticcam wrote:
For anyone who likes this kind of thing, adventofcode.com is up for 2020. Finally completed all available problems today.


Sometimes I'm so damn lazy...

+ Show Spoiler [super shitty code for task 2] +


def random_res(ary)
nums = [ary.sample, ary.sample, ary.sample]

return random_res(ary) if nums.uniq.count < 3
return nums
end

def answer(ary)
uniq_ary = ary.uniq

loop do
res = random_res(uniq_ary)

return res.reduce() if res.sum == 2020
end
end


puts answer(report)


LOL.
i code about 100-200 hours a year in PHP. and i take year long breaks between coding sessions. so when i first get back at it i rely on the code editor complaining. when i'm working within some conditional multi-nested monstrosity i include a line in each branch that is a living tribute to Ayn Rand.

$a=$a;

Ray Kassar To David Crane : "you're no more important to Atari than the factory workers assembling the cartridges"
mahrgell
Profile Blog Joined December 2009
Germany3943 Posts
December 14 2020 19:29 GMT
#20531
Well, if you are looking for amusing solutions, I would recommend: https://github.com/betaveros/advent-of-code-golf-2020

His solutions are also at the bottom of the readme and looks as nice as day 3.1
a{W~\‹#\Ig~M\u]$p}#
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
December 14 2020 20:28 GMT
#20532
I'm always impressed by the single-digit line solutions to these problems. Usually pretty verbose in mine :D
Manit0u
Profile Blog Joined August 2004
Poland17435 Posts
Last Edited: 2020-12-15 04:30:24
December 15 2020 04:20 GMT
#20533
Code golf is a travesty in my eyes. It's like the evil twin brother of spaghetti code.

My solution wasn't funny because of brevity but because of algorithm (or lack thereof) used: it basically picks 3 non-duplicate numbers from an array at random and checks if they sum to 2020 until it finds a match

You can optimize it with memoization etc. but I'm lazy.
Time is precious. Waste it wisely.
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
December 15 2020 05:04 GMT
#20534
Code golf can definitely be dangerous to teach you the wrong habits. I think almost all code you write in your free time should be stuff you find interesting, but it should almost always be "proper" code. Otherwise it's like practicing your baseball swing incorrectly on purpose. You're just going to make it harder to do it properly.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
mahrgell
Profile Blog Joined December 2009
Germany3943 Posts
December 15 2020 07:40 GMT
#20535
Thats like saying motor sport teaches you to ignore traffic rules and sudoku makes you unable to handle numbers with more than one digit...
You can safely assume every code golfer using those golf languages (or writing their own like that guy, who btw is also leading the current AoC, obv not with golfed solutions) knows the difference between proper code and golf and also considers golfing a completely different discipline.
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
December 15 2020 14:18 GMT
#20536
Oh, I'm sure they're capable. What I'm saying is that they're getting rewarded for unclear, but short, solutions. This incentivizes them more and more to write terse, unclear solutions, and makes them much more familiar with that sort of code, meaning they'll use it in actuality more, making their code worse to work with.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
JimmyJRaynor
Profile Blog Joined April 2010
Canada17007 Posts
Last Edited: 2020-12-15 16:02:44
December 15 2020 15:57 GMT
#20537
On December 15 2020 23:18 WarSame wrote:
Oh, I'm sure they're capable. What I'm saying is that they're getting rewarded for unclear, but short, solutions. This incentivizes them more and more to write terse, unclear solutions, and makes them much more familiar with that sort of code, meaning they'll use it in actuality more, making their code worse to work with.

This phenomenon can be a form of turf protecting that I've seen on several occasions.

Sometimes the employer and the coder are on very bad terms and this is the employee's way of submarine-ing the project.

The impossible to detect method of submarine-ing a project is to use some cutting edge unproven tech. Like say, .NET Core 1. If you suspect .NET Core 2 will be really solid this can be a path to higher pay and an abundance of work in the future.
Ray Kassar To David Crane : "you're no more important to Atari than the factory workers assembling the cartridges"
Acrofales
Profile Joined August 2010
Spain18120 Posts
December 17 2020 09:26 GMT
#20538
On December 16 2020 00:57 JimmyJRaynor wrote:
Show nested quote +
On December 15 2020 23:18 WarSame wrote:
Oh, I'm sure they're capable. What I'm saying is that they're getting rewarded for unclear, but short, solutions. This incentivizes them more and more to write terse, unclear solutions, and makes them much more familiar with that sort of code, meaning they'll use it in actuality more, making their code worse to work with.

This phenomenon can be a form of turf protecting that I've seen on several occasions.

Sometimes the employer and the coder are on very bad terms and this is the employee's way of submarine-ing the project.

The impossible to detect method of submarine-ing a project is to use some cutting edge unproven tech. Like say, .NET Core 1. If you suspect .NET Core 2 will be really solid this can be a path to higher pay and an abundance of work in the future.

Combined with your earlier messages, this sounds like first-hand experience

Anyway, just as I don't think Hamilton tries to stop people from passing while driving 200+ km/hour in British traffic, I don't think code golfers confuse their hobby with their job as coders.
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
December 17 2020 14:15 GMT
#20539
Exactly what I was thinking, sounds a little to accurate to not be first-hand

I don't think they'd confuse it, but I would imagine pro drivers might mix in moves that are either street-illegal or dangerous on the street because their surrounding drivers have no idea what's going on.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
JimmyJRaynor
Profile Blog Joined April 2010
Canada17007 Posts
January 18 2021 15:28 GMT
#20540
On November 20 2020 04:17 WombaT wrote:
Show nested quote +
On November 20 2020 03:29 JimmyJRaynor wrote:
On November 19 2020 21:33 Manit0u wrote:
Lazy devs. Devs that think they're super clever when they're not and are trying super hard to create code that only smart people like them will understand. And devs that perhaps think that if they write unintelligible spaghetti code they will become indispensable and they'll be able to work on it for years on end. Beats me.

I call that 'turf protecting'. I prefer to constantly expand my turf so if i lose some of it.. who cares. Developers that do that crap have self confidence issues. If you are reliable, hard-working, know how to play the game of internal political BS while having only average talent ... there will always be a spot for you.

The more talented you are.. the more you can fuck around and get away with it.
On November 19 2020 21:00 WombaT wrote:
On November 19 2020 19:53 Manit0u wrote:
The loops with exception control flow was a piece of software written in Java and used by national airlines...

I have some PHP horror stories too if you want

I've seen a 30k lines of code class being extended several times and each class that extended it had 15-30k lines of code and was itself extended by similarly large classes, each calling parent's constructor at different points in their own constructors.

I've had to reverse engineer 5k lines of code script written by non-programmer that was full of global variables that stored data in arrays that were being manipulated, reversed and overridden in multiple nested loops etc. etc.

Hey at least that gave you something to do.

How the fuck do such things happen haha?

I notice you are changing careers.. so this is an honest respectful question sir..
Have you ever worked in an IT department before? Do you know someone who has?
i guess not?

Dude, most IT departments could start their own puppy farm with the amount of dog-fucking that goes on.

For about 30% of the year when I'm in hermit-coder-mode I produce a lot and I learn a lot. For a good portion of the other 70%... I'm just dicking around. Like right now.

Most of my close friends are software engineers, actually was them that thought it would suit my particular brain and got me pondering the option. Won’t go into the dear diary aspects of why I’m rather underemployed mind, depressing enough held in my brain never mind shared.

My ‘how the fuck?’ more springs from confusion and exasperation than any kind of surprise, although I usually reserve it for HR departments


i'm not sure how far along you are in becoming a software developer.. however.. you might find this guy on youtube informative..


if you are at a beginner level i recommend codepen and some starter javascript projects...



Ray Kassar To David Crane : "you're no more important to Atari than the factory workers assembling the cartridges"
Prev 1 1025 1026 1027 1028 1029 1032 Next
Please log in or register to reply.
Live Events Refresh
Replay Cast
23:00
WardiTV Mondays #59
CranKy Ducklings103
LiquipediaDiscussion
BSL 21
20:00
ProLeague - RO32 Group D
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
ZZZero.O247
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nathanias 181
Ketroc 50
StarCraft: Brood War
Artosis 580
ZZZero.O 247
NaDa 30
Light 8
yabsab 6
Dota 2
monkeys_forever230
NeuroSwarm55
League of Legends
JimRising 476
Counter-Strike
fl0m1623
Super Smash Bros
hungrybox564
AZ_Axe126
Heroes of the Storm
Khaldor170
Other Games
summit1g4465
Grubby4110
ToD143
Maynarde114
febbydoto3
Organizations
Other Games
EGCTV863
gamesdonequick703
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 20 non-featured ]
StarCraft 2
• Hupsaiya 77
• RyuSc2 40
• HeavenSC 25
• musti20045 24
• Adnapsc2 15
• Migwel
• AfreecaTV YouTube
• sooper7s
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• HerbMon 4
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota21387
• Ler49
League of Legends
• Doublelift3145
Other Games
• imaqtpie1722
Upcoming Events
Wardi Open
11h 44m
Monday Night Weeklies
16h 44m
Replay Cast
22h 44m
WardiTV Korean Royale
1d 11h
BSL: GosuLeague
1d 20h
The PondCast
2 days
Replay Cast
2 days
RSL Revival
3 days
BSL: GosuLeague
3 days
RSL Revival
4 days
[ Show More ]
WardiTV Korean Royale
4 days
RSL Revival
5 days
WardiTV Korean Royale
5 days
IPSL
5 days
Julia vs Artosis
JDConan vs DragOn
RSL Revival
6 days
Wardi Open
6 days
IPSL
6 days
StRyKeR vs OldBoy
Sziky vs Tarson
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2025-11-14
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
RSL Revival: Season 3
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
BLAST Open Fall 2025

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.