C
C#ā€¢8mo ago
joren

āœ… Deferred Execution or Forcing Immediate Execution

So I was reading the documentation on LINQ and I came across the two concepts i wrote in the title, now lets look at:
int[] nums = { 1, 2, 3, 4, 5};

var numQuery = from num in nums where (num % 2) != 0 select num;

foreach (int num in numQuery) {
Console.Write(num);
}
int[] nums = { 1, 2, 3, 4, 5};

var numQuery = from num in nums where (num % 2) != 0 select num;

foreach (int num in numQuery) {
Console.Write(num);
}
Now its pretty clear its deferred execution, we declare the query but its actually executed when the foreach is called. What I dont understand is why
var evenNumQuery =
from num in numbers
where (num % 2) == 0
select num;

int evenNumCount = evenNumQuery.Count();
var evenNumQuery =
from num in numbers
where (num % 2) == 0
select num;

int evenNumCount = evenNumQuery.Count();
Is considered Immediate execution, it still declares it and then triggers the query, in this case a foreach internally but conceptually this is pretty much the same. This though:
List<int> numQuery2 =
(from num in numbers
where (num % 2) == 0
select num).ToList();

// or like this:
// numQuery3 is still an int[]

var numQuery3 =
(from num in numbers
where (num % 2) == 0
select num).ToArray();
List<int> numQuery2 =
(from num in numbers
where (num % 2) == 0
select num).ToList();

// or like this:
// numQuery3 is still an int[]

var numQuery3 =
(from num in numbers
where (num % 2) == 0
select num).ToArray();
Calling .ToList or To.Array makes sense, you'd be executing the query in place and returning the result of the execution rather than saving the query to be executed later. Am I misinterpreting the documentation?
182 Replies
joren
jorenā€¢8mo ago
https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/introduction-to-linq-queries#forcing-immediate-execution Just a heads up, I am aware that these technical details arent relevant to beginners. I've been writing C++ for a long time and just trying to understand all the C# details I read over, consider me a nerd šŸ˜„
Pobiega
Pobiegaā€¢8mo ago
First, I'd recommend using method aka fluent syntax instead of query syntax, makes it much easier to read and is generally what most of the community prefers. second, Count(); on an IEnumerable forces execution
joren
jorenā€¢8mo ago
Yeah, it uses foreach internally
Pobiega
Pobiegaā€¢8mo ago
exactly
joren
jorenā€¢8mo ago
but I dont understand why a foreach explicitly after declaring the query is deferred execution and this being any different
Pobiega
Pobiegaā€¢8mo ago
Oh, they're not
joren
jorenā€¢8mo ago
That's what the documentation showed me though, did I misread?
Pobiega
Pobiegaā€¢8mo ago
I think you might have misinterpreted it yes.
var numQuery = from num in nums where (num % 2) != 0 select num;
var numQuery = from num in nums where (num % 2) != 0 select num;
this is the lazy part.
joren
jorenā€¢8mo ago
Because the query variable itself never holds the query results, you can execute it as often as you like.
Pobiega
Pobiegaā€¢8mo ago
or var queyr = nums.Where(x => x%2 != 0); yeah
joren
jorenā€¢8mo ago
Wait, so its about the fact that whenever you use these methods that use forecah you arent exposed to the actual data therefore its immediate execution and its only deferred when you dont use these, and therefore are exposed to the queries data "raw" so it has nothing to do with the "declarate query -> execute query" concept, rather how the source data is handled and what is actually exposed to the programmer? that'd make sense, according to that logic this: int evenNumCount = evenNumQuery.Count(); is Immediate exection, while the first example wouldnt be.
Pobiega
Pobiegaā€¢8mo ago
I don't follow, and I think you are still misunderstanding the docs. let me boot up an IDE, 1 sec
joren
jorenā€¢8mo ago
take your time
var evenNumQuery =
from num in numbers
where (num % 2) == 0
select num;

int evenNumCount = evenNumQuery.Count();
var evenNumQuery =
from num in numbers
where (num % 2) == 0
select num;

int evenNumCount = evenNumQuery.Count();
Why is this "Force Immediate Execution" is my question I guess I get that it uses foreach internally, but lets say I wrote the same count method without using the .Count() but using a simple foreach and counting up with each entry. That would be deferred execution then no?
Pobiega
Pobiegaā€¢8mo ago
// not using var to explicitly show types
int[] source = new []{1,2,3,4,5,6,7,8,9,10};
IEnumerable<int> query = source.Where(x => x % 2 == 0);

// anything else at this point is defered execution.
var count = query.Count();

// immediate execution of the same query:
var r1 = source.Where(x => x % 2 == 0).ToArray();
var r2 = query.ToArray(); // same thing, but deferred. In fact, it will have been iterated twice (here and Count)
// not using var to explicitly show types
int[] source = new []{1,2,3,4,5,6,7,8,9,10};
IEnumerable<int> query = source.Where(x => x % 2 == 0);

// anything else at this point is defered execution.
var count = query.Count();

// immediate execution of the same query:
var r1 = source.Where(x => x % 2 == 0).ToArray();
var r2 = query.ToArray(); // same thing, but deferred. In fact, it will have been iterated twice (here and Count)
no, don't associate the code example under each header with what the header says what its trying to tell you is that the IEnumerable<T> (or IQueryable<T>) types always use deferred execution. They don't execute on their own
joren
jorenā€¢8mo ago
Ah okay, I see - I understand now
Pobiega
Pobiegaā€¢8mo ago
its only when you loop over it, or use a terminating method (Count, ToList, ToArray) etc generally, if your method takes an IEnumerable and returns an IEnumerable, it will work with the deferred execution. There are ofc ways to break this, but its "generally" true
joren
jorenā€¢8mo ago
so its only immediate when you call it at the same place you declare the query essentially
Pobiega
Pobiegaā€¢8mo ago
if you ever save a reference to the IEnumerable<T> created by a LINQ iterator, yes
joren
jorenā€¢8mo ago
makes sense
Pobiega
Pobiegaā€¢8mo ago
even if that is directly followed by an execution, your query is still there and can be executed again
joren
jorenā€¢8mo ago
yeah if you call count directly on it u cant do it again later as the results yield an int in that case
Pobiega
Pobiegaā€¢8mo ago
no you can, but it will be executed again ie iterated again
joren
jorenā€¢8mo ago
var r1 = source.Where(x => x % 2 == 0).Count(); I'd have to restate the query here no, I am not declaring the query anywhere here I directly call .Count?
Pobiega
Pobiegaā€¢8mo ago
depends look at r2 thats executing the "query" query again
joren
jorenā€¢8mo ago
yeah
Pobiega
Pobiegaā€¢8mo ago
even thou we already ran it when we did count = query.Count()
joren
jorenā€¢8mo ago
that uses deferred
Pobiega
Pobiegaā€¢8mo ago
there is no option really .Where is always deferred. But if you never save a reference to that iterator, and just consume it directly with an executor, you dont have multiple enumerations so if you need the filtered data AND the count, then its always better to actualize the query to a list/array first, then access the count on that
MODiX
MODiXā€¢8mo ago
Pobiega
REPL Result: Success
int[] source = {1,2,3};

var query = source.Where(x => x % 2 == 0).Select(x =>
{
// lets do something stupid and add a side-effect to our enumerable
Console.WriteLine(x);
return x;
});

var count = query.Count();
var evenOnly = query.ToArray();
int[] source = {1,2,3};

var query = source.Where(x => x % 2 == 0).Select(x =>
{
// lets do something stupid and add a side-effect to our enumerable
Console.WriteLine(x);
return x;
});

var count = query.Count();
var evenOnly = query.ToArray();
Console Output
2
2
2
2
Compile: 515.921ms | Execution: 107.421ms | React with āŒ to remove this embed.
Pobiega
Pobiegaā€¢8mo ago
oh, should have placed the select before the where. silly me but whatever, you get the point the console output we see here is from the iteration taking place in count, and then the iteration taking place in toArray
joren
jorenā€¢8mo ago
wait when using the Method Syntax you open with select rather than having it at the end I recall seeing its being the other way around with the non syntax way of defining queries
Pobiega
Pobiegaā€¢8mo ago
oh, dont confuse the Selectwith the query syntax select its.. different Select() is Map() from other languages its an A -> B transformation
joren
jorenā€¢8mo ago
std::map<T, Y>?
Pobiega
Pobiegaā€¢8mo ago
probably. I don't do cpp
joren
jorenā€¢8mo ago
what does Select return
Pobiega
Pobiegaā€¢8mo ago
Select<T,TResult>() returns TResult
joren
jorenā€¢8mo ago
{2, 3 },
{6, 4 },
...
{2, 3 },
{6, 4 },
...
Ill check its definition sec
Pobiega
Pobiegaā€¢8mo ago
No description
Pobiega
Pobiegaā€¢8mo ago
here you go šŸ™‚ right now its int,int since thats what I gave it the select here was only to trigger the console writeline its not neede
joren
jorenā€¢8mo ago
ok so it takes the Source Type and the Result type
Pobiega
Pobiegaā€¢8mo ago
int[] source = {1,2,3};

var query = source.Where(x => x % 2 == 0);

var count = query.Count();
var evenOnly = query.ToArray();
int[] source = {1,2,3};

var query = source.Where(x => x % 2 == 0);

var count = query.Count();
var evenOnly = query.ToArray();
this is equally fine, but no output
joren
jorenā€¢8mo ago
and does smth, and then TResult encapusulates, what exactly?
MODiX
MODiXā€¢8mo ago
Pobiega
REPL Result: Success
int[] source = {1,2,3};

var query = source.Select(x => $"{x} is a number.");

Console.WriteLine(string.Join("\n", query));
int[] source = {1,2,3};

var query = source.Select(x => $"{x} is a number.");

Console.WriteLine(string.Join("\n", query));
Console Output
1 is a number.
2 is a number.
3 is a number.
1 is a number.
2 is a number.
3 is a number.
Compile: 569.273ms | Execution: 103.021ms | React with āŒ to remove this embed.
Pobiega
Pobiegaā€¢8mo ago
does this make it clearer?
joren
jorenā€¢8mo ago
Join surely is an amazing method lol it can take a query like that damn
Pobiega
Pobiegaā€¢8mo ago
my select function now is int,string not really it takes IEnumerable<T>
joren
jorenā€¢8mo ago
yes which queries derive from no? or IQueryable i guess
Pobiega
Pobiegaā€¢8mo ago
sure but its not relevant really IEnumerable is just the concept of "you can use foreach on me" thats literally all it is
joren
jorenā€¢8mo ago
ah ye so he x is Source and the result that the operation yields is what it returns
Pobiega
Pobiegaā€¢8mo ago
yes
joren
jorenā€¢8mo ago
so TResult is whatever behind the => yields
Pobiega
Pobiegaā€¢8mo ago
C# uses a lot of type inference, so it understands that its int, string here yes
joren
jorenā€¢8mo ago
type deduction is what I call that return type deduction
Pobiega
Pobiegaā€¢8mo ago
type inference is the official term
joren
jorenā€¢8mo ago
I'll have to change my terminology anyway, it differs quite a bit from C++
Pobiega
Pobiegaā€¢8mo ago
Generic Methods - C# Programming Guide - C#
Learn about methods declared with type parameters, known as generic methods. See code examples and view additional available resources.
joren
jorenā€¢8mo ago
Yeah I read that one, though im not really fond of generic types in C#
Pobiega
Pobiegaā€¢8mo ago
var query = source.Select<int, string>(x => $"{x} is a number.");
var query = source.Select<int, string>(x => $"{x} is a number.");
joren
jorenā€¢8mo ago
its hella limited i have issues implenting generics according to what im used to
Pobiega
Pobiegaā€¢8mo ago
coming from templates in C++, sure :p but they are actually really powerful
joren
jorenā€¢8mo ago
I end up having to rethink my whole approach yes and much safer
Pobiega
Pobiegaā€¢8mo ago
yeah less footguns in general
joren
jorenā€¢8mo ago
yeah and better compile time errors šŸ˜“ Okay, so I understand Select() now though
Pobiega
Pobiegaā€¢8mo ago
great. Where is just Filter and SelectMany is Bind
joren
jorenā€¢8mo ago
seems easy enough, can I add constraints to Select
Pobiega
Pobiegaā€¢8mo ago
wdym?
joren
jorenā€¢8mo ago
or do I just cast inside Select if I need a specific type as TResult
Pobiega
Pobiegaā€¢8mo ago
you can do whatever you want for Tresult you provide the method that maps TSource to TResult if you want to limit the TSources that might go in, you do that with some filtering method before the select
joren
jorenā€¢8mo ago
how does one go about that Where()?
Pobiega
Pobiegaā€¢8mo ago
theres some options I assume we're talking about you having a list of several concrete types but all sharing some base class/interface?
joren
jorenā€¢8mo ago
yes Like IsDerived from or smth alike
Pobiega
Pobiegaā€¢8mo ago
OfType<T>() will filter on the concrete type if you need more control, Where can also be used where you just need to return true or false based on the actual item
joren
jorenā€¢8mo ago
yeah and filter it there makes sense and =>, this piece of syntax sugar it always yields to a standalone method? or is it a lambda under the hood or does it differ on the context in which its used In Select()'s case, a lambda would make sense however in a class like:
class A
{
int smth() => 2 + 2;
}
class A
{
int smth() => 2 + 2;
}
MODiX
MODiXā€¢8mo ago
Pobiega
REPL Result: Success
var source = new List<Base>
{
new Base(),
new Mid(),
new Top()
};

var query = source.OfType<Mid>();
foreach (var x in query)
{
Console.WriteLine(x.GetType().FullName);
}

public class Base { }

public class Mid : Base { }

public class Top : Mid { }
var source = new List<Base>
{
new Base(),
new Mid(),
new Top()
};

var query = source.OfType<Mid>();
foreach (var x in query)
{
Console.WriteLine(x.GetType().FullName);
}

public class Base { }

public class Mid : Base { }

public class Top : Mid { }
Console Output
Submission#0+Mid
Submission#0+Top
Submission#0+Mid
Submission#0+Top
Compile: 700.653ms | Execution: 109.636ms | React with āŒ to remove this embed.
Pobiega
Pobiegaā€¢8mo ago
lambda
joren
jorenā€¢8mo ago
damn, List has that method built in
Pobiega
Pobiegaā€¢8mo ago
no it doesnt :p
joren
jorenā€¢8mo ago
extension method?
Pobiega
Pobiegaā€¢8mo ago
yes same as for array above
joren
jorenā€¢8mo ago
fsss i hate those
Pobiega
Pobiegaā€¢8mo ago
why?
joren
jorenā€¢8mo ago
I'd rather derive from a class, implement it ontop of it
Pobiega
Pobiegaā€¢8mo ago
LINQ is almost entirely based on them
joren
jorenā€¢8mo ago
and call it a day
Pobiega
Pobiegaā€¢8mo ago
lol
joren
jorenā€¢8mo ago
ye I guess I need to adapt
Pobiega
Pobiegaā€¢8mo ago
extension methods are awesome because what if the class is sealed? or you otherwise can't inherit from it like, it'd be kinda shitty to have to derive every single collection just to add LINQ support what if a library you want to use wasnt updated and used non-linq types
joren
jorenā€¢8mo ago
I mean if they all should be able ot handle OfType just put it in the base clase mark it virtual and ensure its overrided though that'd give some overhead I suppose or have a base impl that suffices for all its derived types I am not used to using constraints like this either way though in C++ its not connected to a class to begin with you just call it independtly and give it both types
cap5lut
cap5lutā€¢8mo ago
thats more a SRP thingy
joren
jorenā€¢8mo ago
SRP?
Pobiega
Pobiegaā€¢8mo ago
Or just have a static method that pretends to be part of the object? That's what extensions are
cap5lut
cap5lutā€¢8mo ago
single responsibility principle
joren
jorenā€¢8mo ago
ah, didnt know that was the abbrevation Fair, ill embrace it I promise just need to get used to it I guess
cap5lut
cap5lutā€¢8mo ago
extension methods can be really powerful yeah
joren
jorenā€¢8mo ago
yeah that way you dont always have to rewrite containers if they lack certain things
Pobiega
Pobiegaā€¢8mo ago
hardest part of learning a new language isnt learning the new language, its unlearning the habits from your old language šŸ˜„
joren
jorenā€¢8mo ago
Too bad I work in the C++ industry and C# soon
Pobiega
Pobiegaā€¢8mo ago
the first time I coded javascript or rust was not pretty
joren
jorenā€¢8mo ago
so I need both
Pobiega
Pobiegaā€¢8mo ago
thats fine you dont need to "replace" them, just learn to not force them ie, dont try to force C# to be C++ and the other way around
joren
jorenā€¢8mo ago
its hard when you dove so deep, but im trying haha
cap5lut
cap5lutā€¢8mo ago
i came from the java world so i didnt have to unlearn too much ;p
joren
jorenā€¢8mo ago
C# is such a relaxing language comparabily I like it its not as verboose and complicated all the time, its refreshing Uni made you? Because mine sure as hell forced us to use Java... @Pobiega tysm for your help I'm sure ill bother you again in the future ;)
cap5lut
cap5lutā€¢8mo ago
nah, started out with pascal/delphi back in school, then touched a bit of php and then was looking for some platform independent language for some CLI tools, so ended up with java
joren
jorenā€¢8mo ago
thats tough, guess there werent as mny viable options back then and java was more popular a decade ago, than it is now
cap5lut
cap5lutā€¢8mo ago
yeah that was around 2006-7 iirc the php -> java transition was also because of a chatbot for a mmorpg i was playing back then which was written in php and i was too sick of duck typing
Pobiega
Pobiegaā€¢8mo ago
yw just make a thread here like you did now šŸ™‚
joren
jorenā€¢8mo ago
šŸ‘
Pobiega
Pobiegaā€¢8mo ago
and when you are happy with your answers and want to mark a thread as done, /close it
cap5lut
cap5lutā€¢8mo ago
uh sorry for the thread drift šŸ˜’
joren
jorenā€¢8mo ago
Back then I didnt think about anything programming related I was a damn child
Pobiega
Pobiegaā€¢8mo ago
šŸ˜… I started coding in 94..
joren
jorenā€¢8mo ago
Thats crazy, you two are old and wise huh
Pobiega
Pobiegaā€¢8mo ago
my wife would agree with the "old" part
joren
jorenā€¢8mo ago
'94 so you write C, ASM?
Pobiega
Pobiegaā€¢8mo ago
lol nah
joren
jorenā€¢8mo ago
I dont even know what was the language to write
Pobiega
Pobiegaā€¢8mo ago
vb6 at first, then PHP, then C# (in 2002)
cap5lut
cap5lutā€¢8mo ago
i started 2000, my older siblings had it delphi in school and i wanted them to teach me
joren
jorenā€¢8mo ago
simpler times for programming I assume?
Pobiega
Pobiegaā€¢8mo ago
in a way
joren
jorenā€¢8mo ago
guess less resources but less options
Pobiega
Pobiegaā€¢8mo ago
yeah, exactly
cap5lut
cap5lutā€¢8mo ago
for me it was harder times, living in the sticks, no internet and the local libraries resources were sparse
Pobiega
Pobiegaā€¢8mo ago
no youtube videos that went out of date in half a year after being released...
cap5lut
cap5lutā€¢8mo ago
i still dont like yt tutorials
Pobiega
Pobiegaā€¢8mo ago
but it was also slower progress than now. A talented and motivated person can become "fluent" so damn fast these days, given the right resources yeah same
joren
jorenā€¢8mo ago
I find programming, in a way very tiring nowadays, if I dont keep practicing I lose the ability to write TMP in C++ for instance. So many details, different libs/software/hardware stacked upon eachother I touched some web dev recently and had to learn 100 different things
Pobiega
Pobiegaā€¢8mo ago
oh yeah for sure, if I stopped for a year or so it would be hell to come back into it and C# is fairly stable, tbh javascript, you'd have to relearn the entire ecosystem
joren
jorenā€¢8mo ago
django, gunicorn, nginx, postgresql, docker, kubernetes, etc it just keeps stacking that's good, same with C++ they just add new things but not as fast as compiler support is slow they add more than the compiler devs can handle, so its all slowed down
Pobiega
Pobiegaā€¢8mo ago
web is massive, especially if you include hosting and database like you did there :p
joren
jorenā€¢8mo ago
but the complexcity is disgusting, too many things to take into account good design is crucial gets tiring yep, and we didnt even mention the front end which is framework ontop of framework unless you want to reinvent the wheel and spend 3 years building a frontend
Pobiega
Pobiegaā€¢8mo ago
yeah web is rough. I do it for work thou šŸ™‚ but only backend.. and database... and devops..
joren
jorenā€¢8mo ago
and its paid much less than some desktop orientated jobs though
Pobiega
Pobiegaā€¢8mo ago
eh, not really for a junior FE, sure
joren
jorenā€¢8mo ago
like, my entry salary with a C++ was like 100k
Pobiega
Pobiegaā€¢8mo ago
its all supply and demand all the bootcamps and schools are churning out javascript developers they are dime a dozen
joren
jorenā€¢8mo ago
True, and web dev is filled with people trying to learn it
Pobiega
Pobiegaā€¢8mo ago
well thats where most of the demand is so it makes sense, in a way
joren
jorenā€¢8mo ago
that'd balance it though and make the salaries better
Pobiega
Pobiegaā€¢8mo ago
yesn't I have no idea how accurate this is, but imagine that 80% of dev work today is web but 90-95% of people who are learning learn for web so the pool of people looking for entry level web jobs just keeps getting larger and larger
joren
jorenā€¢8mo ago
then the demand is low in comparison to its supply
Pobiega
Pobiegaā€¢8mo ago
meanwhile, the people who target a lesser used tech, like c++ desktop, sure they have slihtly less jobs to look for, but there are a lot less competition per job yeah exactly
joren
jorenā€¢8mo ago
its relative is what you're trying to say I guess šŸ˜„ so why'd you pick web dev though
Pobiega
Pobiegaā€¢8mo ago
so while web has the highest demand in raw numbers, the relative demand is lower because I picked 20 years ago when the numbers were different
joren
jorenā€¢8mo ago
how old are you now
Pobiega
Pobiegaā€¢8mo ago
37
joren
jorenā€¢8mo ago
not that old then
Pobiega
Pobiegaā€¢8mo ago
I started with PHP at around.. 14? 12?
joren
jorenā€¢8mo ago
bit earlier than me, good age to start what made you stick around though
Pobiega
Pobiegaā€¢8mo ago
It was fun
joren
jorenā€¢8mo ago
because I find programming, fun, but it has its
Pobiega
Pobiegaā€¢8mo ago
no other reason
joren
jorenā€¢8mo ago
well less enjoyable parts
Pobiega
Pobiegaā€¢8mo ago
I never imagined it as a career
joren
jorenā€¢8mo ago
no?
Pobiega
Pobiegaā€¢8mo ago
not until 17-18 like I said, this was back in the 90s
joren
jorenā€¢8mo ago
do you still program as a job, or did you take a manager role later into your career?
Pobiega
Pobiegaā€¢8mo ago
senior dev/devops engineer
joren
jorenā€¢8mo ago
mhm, so you're still fully into it basically
Pobiega
Pobiegaā€¢8mo ago
more or less not a managerial position at least
joren
jorenā€¢8mo ago
and you prefer it like this?
Pobiega
Pobiegaā€¢8mo ago
I've been a lead dev and architect before, but enjoyed those roles less in a way
joren
jorenā€¢8mo ago
makes sense well they can be more burderning I assume
Pobiega
Pobiegaā€¢8mo ago
I'm not a people person, but I'm very good with tech so I try to avoid the peter principle
joren
jorenā€¢8mo ago
makes sense peter principle is to move up the ladder at some point to managing positions Never heard of it
Pobiega
Pobiegaā€¢8mo ago
promotion to your degree of incompetence
joren
jorenā€¢8mo ago
oh
Pobiega
Pobiegaā€¢8mo ago
ie, "you are a good dev, become a lead dev!" "you are a good lead dev, become a manager" then you suck as a manager, because they need people skills, not tech skills
joren
jorenā€¢8mo ago
yeah some pretty obvious example though I suppose skills can be learned even those
Pobiega
Pobiegaā€¢8mo ago
for sure
joren
jorenā€¢8mo ago
but if you're not happy with it then you shouldnt adapt also the process of adapting can be pretty rough and inefficient
Pobiega
Pobiegaā€¢8mo ago
I'm swedish, and here a mid-level manager can easily make less money than the devs they manage I get paid well, so I dont feel like I need to jump to manager for the salaray
joren
jorenā€¢8mo ago
thats interesting, that makes sense
Pobiega
Pobiegaā€¢8mo ago
its probably a local maximum scenario thou
joren
jorenā€¢8mo ago
for me its kind of the same though mostly because managers in general get paid less than C++ engineers
Pobiega
Pobiegaā€¢8mo ago
going via manager to a C level position would definately be a huge pay raise, but its also changing field entirely and my current company is a startup, so we dont have or need a dedicated CTO
joren
jorenā€¢8mo ago
yeah but you wouldnt be able to do that no? jump to C level you'd have to start from the bottom or somewhere in the middle and work your way up progressively over the years
Pobiega
Pobiegaā€¢8mo ago
yeah thats what I mean, go manager -> mid level -> top level -> CTO
joren
jorenā€¢8mo ago
I mean unless you turn out to be a natural talent surely you wont be put in the highest paying level
Pobiega
Pobiegaā€¢8mo ago
exactly its a huge risk and if I decided nah, lets go back to dev, im now out of shape and my CV shows managerial positions so might be hard to go back alr, gotta go back to working. gl hf in C# land
joren
jorenā€¢8mo ago
thanks man, gl with work!
Want results from more Discord servers?
Add your server
More Posts
ā” Possible to copy value of object in debugger and generate code which will recreate this objectI have an awfully complicated class and wish I could copy an object in the debugger, and use that daā” How to fix this problem. I am new to both VS Code and Unity.I am trying to get C# scripts of unity to open in VS Code. Please feel free to ping me and u can addā” How do I initialize a static list with objects? (Quidditch app)I am feeling completely lost on this. I have a playermanager which contains a static list of Player āœ… Transparent BackgroundI'm trying to use AvaloniaUI in my project (linux, mac, and windows only) but I'm not sure how to crāœ… EF Core long running query causing concurrency issuesHello. I have a .NET application that uses a DbContext with PostgreSQL. To test the performance of mā” (Beginner) Seeking Advice on Distributing Items Equally in C# ProgramHey everyone! I hope you're doing well. I'm still pretty new around here and not exactly a pro in tā” ENV var dump collection not working on some machinesI'm using these env vars to collect dumps from my .net core macOS app (docs: https://learn.microsoftā” How to play music files from resources/relative paths in wpf c# ?I have spend good 2 to 3 hours trying to get a sound file played from relative path, it just doesnt ā” Simple code that I dont understand why it wont work.Hello, I am an IT specialized class student and we started learning C# in class, I am trying out somEmulating Windows FeaturesHello, I'm trying to figure out a couple of things before I start a new project. The first of which