• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 05:41
CEST 11:41
KST 18:41
  • 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
Team TLMC #5 - Finalists & Open Tournaments0[ASL20] Ro16 Preview Pt2: Turbulence10Classic Games #3: Rogue vs Serral at BlizzCon9[ASL20] Ro16 Preview Pt1: Ascent10Maestros of the Game: Week 1/Play-in Preview12
Community News
BSL 2025 Warsaw LAN + Legends Showmatch0Weekly Cups (Sept 8-14): herO & MaxPax split cups4WardiTV TL Team Map Contest #5 Tournaments1SC4ALL $6,000 Open LAN in Philadelphia8Weekly Cups (Sept 1-7): MaxPax rebounds & Clem saga continues29
StarCraft 2
General
#1: Maru - Greatest Players of All Time Weekly Cups (Sept 8-14): herO & MaxPax split cups Team Liquid Map Contest #21 - Presented by Monster Energy SpeCial on The Tasteless Podcast Team TLMC #5 - Finalists & Open Tournaments
Tourneys
Maestros of The Game—$20k event w/ live finals in Paris Sparkling Tuna Cup - Weekly Open Tournament SC4ALL $6,000 Open LAN in Philadelphia WardiTV TL Team Map Contest #5 Tournaments RSL: Revival, a new crowdfunded tournament series
Strategy
Custom Maps
External Content
Mutation # 491 Night Drive Mutation # 490 Masters of Midnight Mutation # 489 Bannable Offense Mutation # 488 What Goes Around
Brood War
General
Soulkey on ASL S20 ASL TICKET LIVE help! :D BW General Discussion NaDa's Body A cwal.gg Extension - Easily keep track of anyone
Tourneys
[ASL20] Ro16 Group D [ASL20] Ro16 Group C [Megathread] Daily Proleagues BSL 2025 Warsaw LAN + Legends Showmatch
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile Borderlands 3 General RTS Discussion Thread
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
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
Community
General
US Politics Mega-thread Canadian Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread UK Politics Mega-thread
Fan Clubs
The Happy Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023
World Cup 2022
Tech Support
Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s)
TL Community
BarCraft in Tokyo Japan for ASL Season5 Final The Automated Ban List
Blogs
I <=> 9
KrillinFromwales
The Personality of a Spender…
TrAiDoS
A very expensive lesson on ma…
Garnet
hello world
radishsoup
Lemme tell you a thing o…
JoinTheRain
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1582 users

The Big Programming Thread - Page 297

Forum Index > General Forum
Post a Reply
Prev 1 295 296 297 298 299 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.
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
Portugal3241 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 States17252 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 States17252 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 States17252 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 States17252 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 1031 Next
Please log in or register to reply.
Live Events Refresh
Next event in 19m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Rex 1
StarCraft: Brood War
Calm 5699
Bisu 731
Hyuk 162
HiyA 96
Hyun 96
sorry 86
ToSsGirL 84
Dewaltoss 82
Pusan 77
Light 74
[ Show more ]
Soma 60
actioN 56
Mini 49
ZerO 32
BeSt 30
Liquid`Ret 29
Nal_rA 28
soO 27
Sharp 24
Rush 19
Free 16
SilentControl 10
Dota 2
singsing1260
XcaliburYe206
boxi98170
League of Legends
JimRising 381
Counter-Strike
olofmeister1583
shoxiejesuss598
allub166
Other Games
XaKoH 143
NeuroSwarm80
Trikslyr15
Organizations
StarCraft: Brood War
lovetv 593
Other Games
gamesdonequick587
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 1
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos1421
• Stunt679
Other Games
• WagamamaTV81
Upcoming Events
RSL Revival
19m
Maru vs Reynor
Cure vs TriGGeR
Rex1
Map Test Tournament
1h 19m
The PondCast
3h 19m
RSL Revival
1d
Zoun vs Classic
Korean StarCraft League
1d 17h
BSL Open LAN 2025 - War…
1d 22h
RSL Revival
2 days
BSL Open LAN 2025 - War…
2 days
RSL Revival
3 days
Online Event
3 days
[ Show More ]
Wardi Open
4 days
Monday Night Weeklies
4 days
Sparkling Tuna Cup
5 days
LiuLi Cup
6 days
Liquipedia Results

Completed

Proleague 2025-09-10
Chzzk MurlocKing SC1 vs SC2 Cup #2
HCC Europe

Ongoing

BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
LASL Season 20
RSL Revival: Season 2
Maestros of the Game
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

Upcoming

2025 Chongqing Offline CUP
BSL World Championship of Poland 2025
IPSL Winter 2025-26
BSL Season 21
SC4ALL: Brood War
BSL 21 Team A
Stellar Fest
SC4ALL: StarCraft II
EC S1
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
MESA Nomadic Masters Fall
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
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.