• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 10:26
CEST 16:26
KST 23:26
  • 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
[ASL22] Ro16 Preview: Rough Waters8[ASL22] Ro24 Preview: Siren's Call8[ASL22] Ro24 Preview: Summer's End9Serral wins HomeStory Cup 2915Serral wins Maestros of the Game 244
Community News
Weekly Cups (Aug 30-Sep 7): herO thrives amid growing schism0Official StarCraft website teases new content ahead of BlizzCon?111Stellar Fest TWO the Moon (Dec 16-20)9Weekly Cups (August 24-30): Patches' balance mod takes over3New 3v3 BGH Ladder (and more) on ShieldBattery!46
StarCraft 2
General
Weekly Cups (Aug 30-Sep 7): herO thrives amid growing schism Nexon wins bid to develop StarCraft IP content, distribute Overwatch mobile game Balance hotfix patch 5.0.16b (July 16) SC4ALL: II Winner Will Earn a Spot at HSC 30! Weekly Cups (August 24-30): Patches' balance mod takes over
Tourneys
Sea Duckling Open (Global, Bronze-Diamond) 2026 GSTL Announcement Sparkling Tuna Cup - Weekly Open Tournament Stellar Fest TWO the Moon (Dec 16-20) IntoTheTV X SOOP SC2 League : Weekly & Monthly
Strategy
[G] Having the right mentality to improve
Custom Maps
Nexus Wars 2021 GUIDE [M] (2) Industrial Park
External Content
Mutation # 542 The Ascended Mutation # 541 Binary Choice The PondCast: SC2 News & Results Mutation # 540 Dodge This
Brood War
General
Pros React To: Calm's Big Brain Play Vs Mini Official StarCraft website teases new content ahead of BlizzCon? New 3v3 BGH Ladder (and more) on ShieldBattery! ASL22 General Discussion BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[ASL22] Ro16 Group B [ASL22] Ro16 Group A [ASL22] Ro24 Group F [Megathread] Daily Proleagues
Strategy
Simple Questions, Simple Answers Odyssey Mineral Stack Saturation Replay Review Process - What do you do? Game Theory for Starcraft
Other Games
General Games
EVE Corporation Nintendo Switch Thread Diablo IV [Maplestory Hardcore] Let's Play~!! General RTS Discussion Thread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
[TL LoL EUW IHs] Teemo shall perish TSM pausing esports and CLG Dead
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Power Rank TL Mafia Community Thread NeO.D_StephenKing vs This Guy From 1 Million Dance
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread Things Aren’t Peaceful in Palestine UK Politics Mega-thread Artificial Intelligence Thread
Fan Clubs
MarineLorD Fan Club The Creator Fan Club The ShoWTimE Fan Club
Media & Entertainment
Movie Discussion! Anime Discussion Thread
Sports
Football (Soccer) Thread TeamLiquid Health and Fitness Initiative For 2023 MLB/Baseball 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Northern Ireland Global Starcraft
Blogs
F* the Children and Get Off …
TrAiDoS
Dreaming of BW patches (mod…
c3rberUs
Regacy Esports: The Bh…
regacyesports
LOCKPICKING NOOB
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 7185 users

The Big Programming Thread - Page 297

Forum Index > General Forum
Post a Reply
Prev 1 295 296 297 298 299 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.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
May 08 2013 20:24 GMT
#5921
On May 09 2013 05:21 misirlou wrote:
Show nested quote +
On May 09 2013 05:08 darkness wrote:
Are jobs with C++/Java usually well paid or do you need to go for a less used language like ABAP/COBAL/etc to have good salary?


Depends more on the job/position than on the language. The guys that get the highest payments dont really code anything.


If you mean managers, bosses in general, then I see what you mean.
misirlou
Profile Joined June 2010
Portugal3316 Posts
May 08 2013 20:34 GMT
#5922
On May 09 2013 05:24 darkness wrote:
Show nested quote +
On May 09 2013 05:21 misirlou wrote:
On May 09 2013 05:08 darkness wrote:
Are jobs with C++/Java usually well paid or do you need to go for a less used language like ABAP/COBAL/etc to have good salary?


Depends more on the job/position than on the language. The guys that get the highest payments dont really code anything.


If you mean managers, bosses in general, then I see what you mean.


Project/team managers, auditing/consulting. Anything might have been a stronger word than I intended, they spend less time (how much, depends on the job) than the others doing it.
ZeroReverse
Profile Joined September 2010
Bulgaria108 Posts
May 08 2013 20:35 GMT
#5923
I have been wondering something for the past two days, and looking at the last several posts, its seems that it is ok to ask here.

I have graduated recently and have just a small internship behind my back. Now I have a chance to apply for a job as a junior dev support at quite a good company. The position is not public - the offer is directed to a limited number of people. The small amount of initial information given, suggests that as a dev support, I will have to solve problems that other devs have with their code, develop example applications showcasing certain products and functionality, create tutorials, etc.

I actually want to be a developer myself, but what got me interested in this offer is that it seems to me as a great chance to learn from the mistakes of other more experienced developers. What concerns me tho is that I dont know if this is the right start, or at least a good one. In this company there is a career path to developer (among others) which starts from the said position, but what about if I want to change companies? Is a background as a developer support considered good or is it looked down upon as someone who just did not make it?

The one short thread which I found on stackexchange, suggests that the position indeed is a very good start, but I need some advice please.
Ragnarok shall befall you!
phar
Profile Joined August 2011
United States1080 Posts
Last Edited: 2013-05-09 02:25:18
May 09 2013 02:24 GMT
#5924
Dev support really depends on the company. It's hard to say exactly what your job will entail without knowing the company and the exact position. I've seen dev support for places where you're basically just glorified tech support, acting as a filter for stupid customer problems. I've also seen dev support at other places where you do actually have to read code (and less frequently fix bugs).

So you may be able to learn a lot of stuff about real development, but maybe not. Depends on the position


On May 09 2013 05:08 darkness wrote:
Are jobs with C++/Java usually well paid or do you need to go for a less used language like ABAP/COBAL/etc to have good salary?

Going to agree with misirlou here, it really depends. There are high and low paying jobs for all ranges. Using US numbers here, there will be java/C++ devs out of college who make 50k, and there will be ones who make >150k. There really aren't a lot of ABAP/COBOL people coming out of college because not many places use it that much.

So even if you compare raw numbers for "java dev" with raw numbers for "cobol dev," you might be missing out on the underlying data that shows that the average age & experience of a cobol dev is way higher, as it's much rarer to learn that stuff these days. At some level it's a dying breed.

It's curious that you're even considering going for something like ABAP/COBOL. Do you have someone who works for SAP trying to convince you to go apply there?
Who after all is today speaking about the destruction of the Armenians?
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2013-05-09 03:14:36
May 09 2013 03:12 GMT
#5925
On May 09 2013 11:24 phar wrote:
Dev support really depends on the company. It's hard to say exactly what your job will entail without knowing the company and the exact position. I've seen dev support for places where you're basically just glorified tech support, acting as a filter for stupid customer problems. I've also seen dev support at other places where you do actually have to read code (and less frequently fix bugs).

So you may be able to learn a lot of stuff about real development, but maybe not. Depends on the position


Show nested quote +
On May 09 2013 05:08 darkness wrote:
Are jobs with C++/Java usually well paid or do you need to go for a less used language like ABAP/COBAL/etc to have good salary?

Going to agree with misirlou here, it really depends. There are high and low paying jobs for all ranges. Using US numbers here, there will be java/C++ devs out of college who make 50k, and there will be ones who make >150k. There really aren't a lot of ABAP/COBOL people coming out of college because not many places use it that much.

So even if you compare raw numbers for "java dev" with raw numbers for "cobol dev," you might be missing out on the underlying data that shows that the average age & experience of a cobol dev is way higher, as it's much rarer to learn that stuff these days. At some level it's a dying breed.

It's curious that you're even considering going for something like ABAP/COBOL. Do you have someone who works for SAP trying to convince you to go apply there?


Yep, my father. He has to deal with this ABAP/SAP stuff at work. He is the one that has advised me recently to look for "business processes" when I was praising OOP/Java/C++. He thinks C++ is difficult and that you need to be extremely good to achieve good salary with that language. I think he is saying in a way that you could earn more with ABAP if you're less skilled than for C++.
Craton
Profile Blog Joined December 2009
United States17303 Posts
Last Edited: 2013-05-09 03:19:14
May 09 2013 03:15 GMT
#5926
That really depends on what you mean by "good salary."

I think we start people somewhere north of 60k if they've got a wide breadth of language knowldge (say, Java, C#, C++/C, SQL) and some internship experience. More typical starting salary is in the 50k range out of college, I'd say.

Mobile development (apps) and agile development (methodology) are really big right now. Good technical / project managers definitely make a lot (but fuck if I don't hate everything to do with project management :p).

I've never even heard of ABAP. Maybe it makes "more" because it's so niche and hard to find people who know it.
twitch.tv/cratonz
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2013-05-09 07:46:01
May 09 2013 03:22 GMT
#5927
On May 09 2013 12:15 Craton wrote:
That really depends on what you mean by "good salary."

I think we start people somewhere north of 60k if they've got a wide breadth of language knowldge (say, Java, C#, C++/C, SQL) and some internship experience. More typical starting salary is in the 50k range out of college, I'd say.

Mobile development (apps) and agile development (methodology) are really big right now.

I've never even heard of ABAP. Maybe it makes "more" because it's so niche and hard to find people who know it.


Regarding ABAP, I guess this is the reason.

Hehe, then I probably have luck. I've enrolled for 'Mobile Computing' module for my next year at university, it is, unfortunately, iOS, and I don't like Apple/Mac but oh well. Speaking of 'agile development', I'm currently revising for my 'Software Tools' exam which covers the XP (Extreme Programming) methodology, so I guess I have some luck here. I'm far from thinking that alone would be enough. I think it was you that have mentioned Scrum recently, and I came across it yesterday when I was looking for IT job salaries & requirements.
Craton
Profile Blog Joined December 2009
United States17303 Posts
May 09 2013 03:31 GMT
#5928
We dumped Scrum for Kanban because it really wasn't working for our circumstances. I think XP was raised as a possible choice, too.

Our mobile devs are doing everything natively iirc (which I think means C++ for everything?) because they're trying to support all three platforms (though focused mainly on Android/iOS) and maintaining different code bases is a pain in the ass.

Actually, maybe that's not true. I know we have one app that's being done in Java for the Android version. I haven't worked on those teams yet.
twitch.tv/cratonz
phar
Profile Joined August 2011
United States1080 Posts
Last Edited: 2013-05-09 03:36:59
May 09 2013 03:36 GMT
#5929
On May 09 2013 12:12 darkness wrote:
Show nested quote +
On May 09 2013 11:24 phar wrote:
Dev support really depends on the company. It's hard to say exactly what your job will entail without knowing the company and the exact position. I've seen dev support for places where you're basically just glorified tech support, acting as a filter for stupid customer problems. I've also seen dev support at other places where you do actually have to read code (and less frequently fix bugs).

So you may be able to learn a lot of stuff about real development, but maybe not. Depends on the position


On May 09 2013 05:08 darkness wrote:
Are jobs with C++/Java usually well paid or do you need to go for a less used language like ABAP/COBAL/etc to have good salary?

Going to agree with misirlou here, it really depends. There are high and low paying jobs for all ranges. Using US numbers here, there will be java/C++ devs out of college who make 50k, and there will be ones who make >150k. There really aren't a lot of ABAP/COBOL people coming out of college because not many places use it that much.

So even if you compare raw numbers for "java dev" with raw numbers for "cobol dev," you might be missing out on the underlying data that shows that the average age & experience of a cobol dev is way higher, as it's much rarer to learn that stuff these days. At some level it's a dying breed.

It's curious that you're even considering going for something like ABAP/COBOL. Do you have someone who works for SAP trying to convince you to go apply there?


Yep, my father. He has to deal with this ABAP/SAP stuff at work. He is the one that has advised me recently to look for "business processes" when I was praising OOP/Java/C++. He thinks C++ is difficult and that you need to be extremely good to achieve good salary with that language. I think he is saying in a way that you could earn more with ABAP if you're less skilled than for C++.

Ha your dad sounds like my grandpa. Many years ago (30?) he told my uncle to go be an actuarian because it was a sure job, instead of working on building this new "Internet" thing. Take that kind of advice with a grain of salt. There's not much growth in that area.

Sure, if you have 20 years of experience writing COBOL and know some company's 40 year old legacy system really well, you can write your own ticket because the company that relies on you is SOL if you leave. But that doesn't mean that it's a good idea to invest your time in college learning that kind of software. In any event, there are a lot more resources out there to help you become a good java/c++ dev, because that's what everyone else is using.

The tooling is also way better for more modern languages. It's a lot more fun to program with a good framework that gets rid of most of the administrative crap logic.
Who after all is today speaking about the destruction of the Armenians?
Craton
Profile Blog Joined December 2009
United States17303 Posts
May 09 2013 06:05 GMT
#5930
On May 09 2013 05:35 ZeroReverse wrote:
I have been wondering something for the past two days, and looking at the last several posts, its seems that it is ok to ask here.

I have graduated recently and have just a small internship behind my back. Now I have a chance to apply for a job as a junior dev support at quite a good company. The position is not public - the offer is directed to a limited number of people. The small amount of initial information given, suggests that as a dev support, I will have to solve problems that other devs have with their code, develop example applications showcasing certain products and functionality, create tutorials, etc.

I actually want to be a developer myself, but what got me interested in this offer is that it seems to me as a great chance to learn from the mistakes of other more experienced developers. What concerns me tho is that I dont know if this is the right start, or at least a good one. In this company there is a career path to developer (among others) which starts from the said position, but what about if I want to change companies? Is a background as a developer support considered good or is it looked down upon as someone who just did not make it?

The one short thread which I found on stackexchange, suggests that the position indeed is a very good start, but I need some advice please.

I started writing this reply earlier then forgot about it.

The only people who can answer your questions are those at the company itself. You are allowed to ask them questions -- it's generally perceived that those who ask questions are better interviewees than those who have nothing to say when the time comes. While the concept of joining and leaving a company may be new to you, it's very much routine to companies. People come and go all the time: they're not going to be put off by some probing questions about the job (if anything, it signifies you're more likely to stick around because you went into the position eyes-open).

At some places a QA position will always stay QA and at others they may move to development. The technicality of the position will vary from place to place, too.
twitch.tv/cratonz
adwodon
Profile Blog Joined September 2010
United Kingdom592 Posts
May 09 2013 09:42 GMT
#5931
I can't imagine why a company wouldn't promote from within, especially in a technical area.

If you're good enough to be a developer and show them by taking an active interest in what the company is doing, performing well, asking questions and performing above your post you'll get there. Learn their code base, ask questions when writing sample apps and just generally get to know the people around you.

Being a developer isn't easy but its not some mystically difficult thing either. You need to be smart, but most people who try to get into this stuff, and especially those who get internships and a good degree, are smart enough. So beyond that it's really just about attitude, work hard and work intelligently, don't burn yourself out but do get noticed and unless its some kind of hellish caricature of the evil corporation (most aren't) they will take an active interest in you and help you out.

Companies are generally a two way conversation, if you just sit on your ass and do your job by the book the company will follow its book, give you the odd pay rise based on performance and pat you on the back every so often but if you actively engage with them they should do the same with you.

Worst case, you have good experience and you can use your spare time to build up a better CV to go join a better company.

Considering the shitty time a lot of people have with first jobs, a technical support role for a respected company is actually a pretty solid start, you don't want to get stuck there sure, but that could be said of the start of any career really.
gyth
Profile Blog Joined September 2009
657 Posts
May 09 2013 10:34 GMT
#5932
On May 08 2013 08:17 darkness wrote:
ABAP http://en.wikipedia.org/wiki/ABAP

THAT LANGUAGE LOOKS ANGRY. I DON'T THINK I COULD WORK WITH A LANGUAGE THAT WAS ALL CAPS ALL THE TIME. WAS THAT THING MADE BEFORE TELETYPES HAD LOWER CASE?
The plural of anecdote is not data.
Mackin
Profile Blog Joined December 2010
Ireland181 Posts
Last Edited: 2013-05-09 11:19:59
May 09 2013 11:07 GMT
#5933
On May 09 2013 19:34 gyth wrote:
Show nested quote +
On May 08 2013 08:17 darkness wrote:
ABAP http://en.wikipedia.org/wiki/ABAP

THAT LANGUAGE LOOKS ANGRY. I DON'T THINK I COULD WORK WITH A LANGUAGE THAT WAS ALL CAPS ALL THE TIME. WAS THAT THING MADE BEFORE TELETYPES HAD LOWER CASE?

I giggled as I thought the same thing :D

OK, as a college student studying a CS degree, I've been using Java, C++, C#, SQL and out of college I learned Objective C for iOS at an internship last summer. I am due to go on a year long paid placement as a trainee software engineer next month as part of my degree. I was wondering how much in depth knowledge I will realistically be expected to know of each language while on the job. I feel my java and objective-c knowledge is sound but I'm not overly confident on the other languages as I found C++ fairly difficult.
Serenity
Craton
Profile Blog Joined December 2009
United States17303 Posts
May 09 2013 13:31 GMT
#5934
Companies aren't stupid. They know college grads know basically nothing.
twitch.tv/cratonz
adwodon
Profile Blog Joined September 2010
United Kingdom592 Posts
May 09 2013 15:41 GMT
#5935
On May 09 2013 22:31 Craton wrote:
Companies aren't stupid. They know college grads know basically nothing.


This is essentially true, and you'll be on placement, not even a graduate yet.

They won't expect anything except a very very basic understand and the ability to learn. Besides its a placement so they aren't going to fire you, although I'm not going to pretend I know how that actually works, gross misconduct is probably a given way to get booted off.

If you're bad they'll just give you no responsibility and easy tasks and won't offer you a job at the end of it, that's all.
You'll still graduate and if you learn from it you won't lose out on anything but a job at that one particular company.

I wouldn't worry about what you know now but really there isn't much to the fundamentals of each language and noones going to expect you to understand the intricacies of C++ or Java, that's the sort of thing you gain in your first few years in a professional environment, not on a college course.

Probably the first thing you'll learn is that defining experience by language means literally nothing, 'knowing' C++ isn't really a thing. The only people who really know a language are the guys who write compilers and they would call themselves compiler writers. It's kind of like saying 'I know Hammers', sure you solve the problem with the hammer but its a tool not a solution in itself.
Mackin
Profile Blog Joined December 2010
Ireland181 Posts
May 09 2013 19:09 GMT
#5936
I know what you mean, that all sounds pretty sensible. I've heard people who've said similar things about placements - if you're talented you'll be hard worked and offered a job, and if you're a lazy shit you'll be fobbed off with easy tasks and said farewell to at the end of the year.

And the point about "knowing" a language is good too. I guess as long as you know the fundamentals of programming in general you can get on fine with any language.

Serenity
ZeroReverse
Profile Joined September 2010
Bulgaria108 Posts
May 09 2013 20:32 GMT
#5937
@ Craton & adwodon, thanks for the help, I really appreciate it.
Ragnarok shall befall you!
thOr6136
Profile Blog Joined July 2009
Slovenia1775 Posts
Last Edited: 2013-05-09 22:52:34
May 09 2013 22:47 GMT
#5938
Hey, i have a problem.

So, java. Summing up a task first: 300 txt files with dates and temperatures over 10 years. I have to read all the temperatures and add them into maps with different kind of keys, for value we use List<Double> for storing temperatures. So basically we have to make 4 kind of maps with different kind of keys. One key is Location (name of file) other one is Location + year etc. After that we have to make another set of maps - keys equivalent to the ones before only values have to be different. This time we need double array (List before) with 2 values in it, one is an average value of all temperatures in that list (from map from before). Now here i have a problem.

I use a method for generating a new HashMap with same keys as before but different kind of values (double arrays). The problem is, when i add keys to the new map i am creating (i use put(key, value)) it overwrites values from before but the key is completely different. It shouldn't happen because put method always compares 2 keys with equals() method and it compares hashCode(). When i debug the key that i input in put method is always different, but values get overwritten each time. It's so strange... Anyway i can post a code of this part:


public static HashMap<String, double[]> averages(HashMap<String, List<Double>> map)
{
HashMap<String, double[]> mapAverage = new HashMap<>();
double[] x = new double[2];

for(Map.Entry<String, List<Double>> entry : map.entrySet())
{
// if i System.out.println(key); all keys are different
String key = entry.getKey();
//used to generate average number of all temperatures in list
x[0] = povprecje(entry.getValue(), key);
//used to generate something else
x[1] = odmik(entry.getValue(), key, x[0]);
mapAverage.put(key, x);
}
return mapAverage;
}


Is there anything that could make overwriting all the values from before in map? Or am i missing something in this part?
berated-
Profile Blog Joined February 2007
United States1134 Posts
May 10 2013 00:18 GMT
#5939
On May 10 2013 07:47 thOr6136 wrote:
Hey, i have a problem.

So, java. Summing up a task first: 300 txt files with dates and temperatures over 10 years. I have to read all the temperatures and add them into maps with different kind of keys, for value we use List<Double> for storing temperatures. So basically we have to make 4 kind of maps with different kind of keys. One key is Location (name of file) other one is Location + year etc. After that we have to make another set of maps - keys equivalent to the ones before only values have to be different. This time we need double array (List before) with 2 values in it, one is an average value of all temperatures in that list (from map from before). Now here i have a problem.

I use a method for generating a new HashMap with same keys as before but different kind of values (double arrays). The problem is, when i add keys to the new map i am creating (i use put(key, value)) it overwrites values from before but the key is completely different. It shouldn't happen because put method always compares 2 keys with equals() method and it compares hashCode(). When i debug the key that i input in put method is always different, but values get overwritten each time. It's so strange... Anyway i can post a code of this part:


public static HashMap<String, double[]> averages(HashMap<String, List<Double>> map)
{
HashMap<String, double[]> mapAverage = new HashMap<>();
double[] x = new double[2];

for(Map.Entry<String, List<Double>> entry : map.entrySet())
{
// if i System.out.println(key); all keys are different
String key = entry.getKey();
//used to generate average number of all temperatures in list
x[0] = povprecje(entry.getValue(), key);
//used to generate something else
x[1] = odmik(entry.getValue(), key, x[0]);
mapAverage.put(key, x);
}
return mapAverage;
}


Is there anything that could make overwriting all the values from before in map? Or am i missing something in this part?


You need to move the double[] creation to within the for loop.

Even though you are putting new values in the array, you are putting the same array into each entry into the map.
thOr6136
Profile Blog Joined July 2009
Slovenia1775 Posts
May 10 2013 07:22 GMT
#5940
On May 10 2013 09:18 berated- wrote:
Show nested quote +
On May 10 2013 07:47 thOr6136 wrote:
Hey, i have a problem.

So, java. Summing up a task first: 300 txt files with dates and temperatures over 10 years. I have to read all the temperatures and add them into maps with different kind of keys, for value we use List<Double> for storing temperatures. So basically we have to make 4 kind of maps with different kind of keys. One key is Location (name of file) other one is Location + year etc. After that we have to make another set of maps - keys equivalent to the ones before only values have to be different. This time we need double array (List before) with 2 values in it, one is an average value of all temperatures in that list (from map from before). Now here i have a problem.

I use a method for generating a new HashMap with same keys as before but different kind of values (double arrays). The problem is, when i add keys to the new map i am creating (i use put(key, value)) it overwrites values from before but the key is completely different. It shouldn't happen because put method always compares 2 keys with equals() method and it compares hashCode(). When i debug the key that i input in put method is always different, but values get overwritten each time. It's so strange... Anyway i can post a code of this part:


public static HashMap<String, double[]> averages(HashMap<String, List<Double>> map)
{
HashMap<String, double[]> mapAverage = new HashMap<>();
double[] x = new double[2];

for(Map.Entry<String, List<Double>> entry : map.entrySet())
{
// if i System.out.println(key); all keys are different
String key = entry.getKey();
//used to generate average number of all temperatures in list
x[0] = povprecje(entry.getValue(), key);
//used to generate something else
x[1] = odmik(entry.getValue(), key, x[0]);
mapAverage.put(key, x);
}
return mapAverage;
}


Is there anything that could make overwriting all the values from before in map? Or am i missing something in this part?


You need to move the double[] creation to within the for loop.

Even though you are putting new values in the array, you are putting the same array into each entry into the map.


Thanks! Oh man i didn't know it works that way. I was so focused on the key part that i didn't even think what's happening with the value variable.
Prev 1 295 296 297 298 299 1032 Next
Please log in or register to reply.
Live Events Refresh
GSL
11:00
2026 GSTL: Main Stage Day 5
IntoTheiNu 910
CranKy Ducklings SOOP178
Rex26
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SHIN 120
Maru 74
Classic 36
herO (SOOP) 29
Trap 28
Rex 26
Zoun (SOOP) 19
Solar (SOOP) 6
StarCraft: Brood War
Britney 57934
Calm 5705
Bisu 1764
ggaemo 1573
EffOrt 1325
Light 415
Rush 306
Mini 282
actioN 251
Stork 228
[ Show more ]
Soulkey 191
Snow 161
Larva 145
Hyun 144
hero 124
Mind 82
Barracks 64
Sharp 54
ToSsGirL 53
soO 35
Aegong 25
Terrorterran 24
HiyA 19
SilentControl 18
Shine 18
Rock 13
Dota 2
qojqva3465
Dendi1726
420jenkins390
syndereN371
Counter-Strike
markeloff323
edward78
Super Smash Bros
hungrybox653
Other Games
hiko902
B2W.Neo872
Lowko432
crisheroes306
XaKoH 287
Hui .259
Liquid`VortiX253
Liquid`RaSZi122
QueenE52
ArmadaUGS49
Trikslyr9
Organizations
Other Games
BasetradeTV20
Algost 7
[ Show 13 non-featured ]
StarCraft 2
• StrangeGG 80
• Gemini_19 3
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos1973
• Nemesis1885
• TFBlade590
Upcoming Events
PiGosaur Cup
9h 35m
Kung Fu Cup
20h 35m
Replay Cast
1d 9h
The PondCast
1d 19h
KCM Race Survival
1d 19h
Escore
2 days
IntoTheTV X SOOP
2 days
CranKy Ducklings
3 days
Sparkling Tuna Cup
4 days
Shopify Rebellion Sundays
5 days
Spirit vs Mixu
Clem vs TBD
[ Show More ]
RSL Revival
5 days
Replay Cast
5 days
Afreeca Starleague
5 days
WardiTV Weekly
5 days
Afreeca Starleague
6 days
GSL
6 days
Liquipedia Results

Completed

Proleague 2026-09-02
PiG Sty Festival 8.0
Big Dog Cup 2026 Div 1

Ongoing

KCM Race Survival 2026 Season 3
K-JUNGMAN
ASL Season 22
Super Anchor Qualifying S3
CSL 2026 AUTUMN (S22)
Acropolis #5
Acropolis #5 - TRS
RSL Revival: Season 6
Calamity Invitational
FISSURE Playground #3
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026

Upcoming

Escore Tournament S3: King of Kings
Acropolis #5 - GSA
Blizzard Classic Cup 2026
Acropolis #5 - GSB
Acropolis #5 - GSC
SC4ALL II: Brood War
HSC XXX
Stellar Fest 2: Lunar Cup
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Offline Finals
Stake Ranked Episode 6
BLAST Rivals Fall 2026
IEM Beijing 2026
Stake Ranked Episode 5
PGL Masters Bucharest 2026
1win Private Club #2
Thunderpick World Champ. '26
ESL Pro League Season 24
Stake Ranked Episode 4
1win Private Club #1
Logitech G Play Connect 2026
SL StarSeries Fall 2026
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 © 2026 TLnet. All Rights Reserved.