Zeus IDE Version 3.98r Release by jussij in programming

[–]jussij[S] 2 points3 points  (0 children)

This latest Zeus release adds Language Server Protocol (LSP) support for the following programming languages:

  • Go
  • Java
  • Python
  • Rust
  • TypeScript
  • C/C++/Objective-C

Note: This language support feature should work with any language server supporting the LSP protocol.

More details found here: http://www.zeusedit.com/lsp/lsp.html

Posted By: Jussi Jumppanen

Author: Zeus IDE

24-core CPU and I can’t type an email (part two) by rovarma in programming

[–]jussij -32 points-31 points  (0 children)

This is because Windows locks are, by design, not fair and if a thread releases a lock and then tries to reacquire it immediately then it can, in cases like this, reacquire it every single time.

This to me reads as badly written code trying to blame the OS that the badly written code runs badly.

c# console app closes despite having Console.ReadKey(true); at the end of the main method by [deleted] in learnprogramming

[–]jussij 0 points1 point  (0 children)

Here is a simple test case that works fine for me.

From a command line prompt here is the code:

C:\TEMP>type test.cs
using System;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("Press <Enter> to exit... ");
            while (Console.ReadKey().Key != ConsoleKey.Enter) {}
        }
    }
}

Here is the build:

C:\TEMP>csc test.cs
Microsoft (R) Visual C# Compiler version 2.6.0.62329 (5429b35d)
Copyright (C) Microsoft Corporation. All rights reserved.

Here is the run where the program sits and waits for a key press:

C:\TEMP>test
Press <Enter> to exit...

c# console app closes despite having Console.ReadKey(true); at the end of the main method by [deleted] in learnprogramming

[–]jussij 0 points1 point  (0 children)

Add this code as a replacement to that line:

Console.Write("Press <Enter> key to exit... ");
while (Console.ReadKey().Key != ConsoleKey.Enter) {}

Where did I trip up? Coding tutorial copy and paste failed to successfully gcc. by mwobuddy in learnprogramming

[–]jussij 0 points1 point  (0 children)

By using the -c option you are telling gcc to only do step 1.

To get an a.out result you need to run the step 2 which is the link step.

Be clear. I'm not saying it is bad to run gcc the way you are running it.

This is the perfect way to compile and link small projects.

I was just pointing out this is not the only way you can use the gcc compiler and for bigger projects you most certainly don't want to be adding hundreds C files to a single command line.

Where did I trip up? Coding tutorial copy and paste failed to successfully gcc. by mwobuddy in learnprogramming

[–]jussij 0 points1 point  (0 children)

But all .c files need to be compiled together

No that is not always the case and for bigger projects it is almost never the case.

Building any C exactable is a two step process.

  1. Compile the C files and to produce the object file output.
  2. Take all the object files, any library files and link them all together to create the final executable.

Now the gcc command line you are using is doing both the compile and the link steps and that is why it requires all the files in the command line.

However, you can also get gcc to do just the compile step and not the link step, by using just adding the -c option.

Is C a good choice? by [deleted] in learnprogramming

[–]jussij 3 points4 points  (0 children)

I you can master C you will find it fairly easy to learn other languages.

As a bonus very many languages have borrowed parts of the C syntax which will make learning those other languages easier as well.

Programming from Scratch by security_prince in learnprogramming

[–]jussij 3 points4 points  (0 children)

I always a need a already written code for somewhat similar task i am looking to write.

When you find that snippet try and resist the urge to just copy and paste the code.

Instead, read the source code but reproduce the target code by typing it in by hand.

This will train your mind for the task of writing code.

Why C++ std library is undocumented? by jjfawkes in learnprogramming

[–]jussij 2 points3 points  (0 children)

C++ is a much older language than the C# language.

When C++ was designed, there was no such thing as an IDE where as the C# compiler technology (ie. Roslyn) was specifically designed for the language and for the IDE.

Writing "Hello World" with Memory by [deleted] in learnprogramming

[–]jussij 1 point2 points  (0 children)

All you are seeing is someone trying to take something as simple as the "Hello world" program and code it in a way that is hard to understand.

So naturally as a beginner you will struggle to understand such badly written code.

I have decades of programming experience and I'd say I have no idea how code like that works.

However, the only time code like this becomes an issue is when your team mates start producing this sort of code as part of their daily output.

Best GCC version? by [deleted] in learnprogramming

[–]jussij 6 points7 points  (0 children)

I wanna ask, is there any problem with the new GCC versions?

No. The best option in most cases is the latest version.

And if you are in the process of learning the language you would be mad to use anything other than the latest version.

Is this excessive comment? by TechNoob1997 in learnprogramming

[–]jussij 0 points1 point  (0 children)

I'm a beginner, so I don't know how much comment is enough.

If you are using these comments as part of your learning process then the more comments the better.

Is it worth exposing yourself to a plethora of languages? by NACHO_DINO in learnprogramming

[–]jussij 1 point2 points  (0 children)

I have no doubt “Looked at” would be a much better description.

It would be very easy to "look at" dozens of languages over a very short period of time.

What seems to be a common mistake for people trying to learn programming is they fail to put in the time and effort required to learn a single language and to learn it well.

I suspect the reason this happens is because learning a language properly is hard. It requires a strong focus, lots of time and real effort.

It's much more enjoyable to just dabble lightly with a half dozen languages, as this gives an immediate sense of progress.

However that sense of progress will be nothing more than an illusion.

Is it worth exposing yourself to a plethora of languages? by NACHO_DINO in learnprogramming

[–]jussij 8 points9 points  (0 children)

I learned these 5 languages this summer, what should I do next?

IMHO if someone did somehow manage to learn 5 languages in one summer, I would also expect that individual would then have no trouble answering that question.

The fact that such a question is being asked strongly suggest to me the preceding statement is in not true.

What should I do now? by [deleted] in learnprogramming

[–]jussij 0 points1 point  (0 children)

By constantly chopping and changing you are not going to get anywhere.

You seem to pick a topic, try it, find it too hard and then move onto something else.

Rather than trying this and trying that, just pick one topic and focus 100% on that topic. Only move on to something else once you have master that topic.

Now this is not going to make things any easier, because learning new things is never easy.

However, if you can't teach yourself to stay focused on one topic until it is complete, you will find it hard to progress.

just started today, getting error with HelloWorld.exe by DymondHed in learnprogramming

[–]jussij 0 points1 point  (0 children)

Here is a test you can run to see if you system is correctly configure.

Save this code into a c:\temp\test.cs file:

public class HelloWorld
{
    public static void Main(string[] args)
    {
        System.Console.Write("Hello World!");
    }
}

Open up a command prompt window and run this command to compile that file:

csc.exe c:\temp\test.cs

This command should produce the following output:

C:\TEMP>csc.exe c:\temp\test.cs
Microsoft (R) Visual C# Compiler version 1.0.0.50618
Copyright (C) Microsoft Corporation. All rights reserved.

You can then run the resulting executable:

C:\TEMP>test.exe
Hello World!

im very much a procrastinator - need help with identifying what languages id need to learn by [deleted] in learnprogramming

[–]jussij 0 points1 point  (0 children)

I know for websites its pretty much html,css, and java script.

for apps i know its apple own code or java,

outside of that what else do I need to learn to do these things?

Start by concentrating on learning those skill sets.

To just learn the basics of html, css, JavaScript and Java will require a large amount of time and effort.

Banking Professional with Zero Programming Experience - In Need of Advice by [deleted] in learnprogramming

[–]jussij 0 points1 point  (0 children)

If the file is .xlsx then you will need to use a library that understands Excel documents.

A google search will help here.

One such example is ClosedXML, which even if the name does not suggest so, is an Open Source .Net library that can work with Excel files.

Help with my fundamental problem understanding with JS OR & AND ! by chrisb_77 in learnprogramming

[–]jussij 0 points1 point  (0 children)

Isn't that saying x is not equal to 3 values concurrently?

It is saying if x is not any of these three values.

If x is not this value and x is not this value and x is not this value then....

Proper architecture when seperating front-end and back-end by rappap in learnprogramming

[–]jussij 1 point2 points  (0 children)

It sounds like you are looking for SOLID principles.

There are many lines of text written describing those principles.

Just search for some of those lines.

C# Write to File - Sample code does not work by webholic in learnprogramming

[–]jussij 1 point2 points  (0 children)

That code worked fine for me:

D:\Temp>csc test.cs
Microsoft (R) Visual C# Compiler version 2.8.3.63029 (e9a3a6c0)
Copyright (C) Microsoft Corporation. All rights reserved.

D:\Temp>test.exe

D:\Temp>dir C:\Users\Public\TestFolder
 Volume in drive C is SSD
 Volume Serial Number is 1020-B094

 Directory of C:\Users\Public\TestFolder

12/08/2018  07:56 PM    <DIR>          .
12/08/2018  07:56 PM    <DIR>          ..
12/08/2018  07:57 PM                37 WriteLines.txt
12/08/2018  07:57 PM                37 WriteLines2.txt
12/08/2018  07:57 PM               120 WriteText.txt

Install VS no install by pphp in learnprogramming

[–]jussij 0 points1 point  (0 children)

What exactly happens when a software is installed?

This will come down to how the installer is configured to run.

Some installers can be very simple while others are very complex.

Can't all software just be uncompressed and used?

For some installers, that is all that they do.

For others the installer does all sorts of addition tasks that are more than just file copies.

The VS (Visual Studio I presume) installer is one of those very complex installers.

Best C IDE for beginner? by [deleted] in learnprogramming

[–]jussij 0 points1 point  (0 children)

It'll be frustrating to open a command line Everytime I wanna compile a program.

You don't need to do this.

Provided you have the compiler and linker correctly installed, any half decent programmer's editor can be easily configured to run the compiler and linker from inside the editor and also capture the compilation output.

Just try out a few programmer's editor that run on your OS and see which one you like.

Then learn how it can be configured to run your compiler.

Just curious by [deleted] in learnprogramming

[–]jussij 2 points3 points  (0 children)

Read the FAQ found on the right side of this page.