Note taking extension on vscode that helps programming? - visual-studio-code

I'm new to programming, during learning I face problems like I don't fully understand some part of codes in a complex program, therefore I need to write down what I don't understand somewhere, and retrieve/review codes&my questions later. Therefore I'm looking for a vscode extension or software that can implement those functions:
comment on code
overview on my written comments(I want to go through everything I write down in one place)
jump to the location in codes where I write this comment
Any suggestions? Thanks!

Related

VS Code: Looking for an axtension to group other extensions by programming language

Okay, I know the title is not very clear, but is hard to describe what I need, so I'll try to describe it better:
I use a lot of programming languages due to my studies at the university, and my favorite editor is visual studio. The problem is, I don't want to overload it with a lot of active extensions at the same time. Therefore, the idea I came up with is an extension that creates "sessions" (or something like that) depending on what programming language I want to use. For example, imagine I want to use python, then I'd turn on an option which will enable the extensions needed for python and it will disable the remaining ones.
I can't find any similar extension on Google, I don't know if I am using the correct keywords for that, though. So, if you know of something that will help me, let me know please.

How can I add a Ender Dragon in Minecraft modding?

I have been looking around the Internet, and no one seems to know (or care) about my question :P. I would like to know how to add a Ender Dragon mob into Minecraft. I am using Eclipse, and Youth Digital software. If you don't know what that is, just give me something to copy and paste. I'm pretty noob-ish at coding at stuff, so any help will be appreciated. Thanks!
In my opinion, you need to watch a few more tutorials and understand more of the basics such as item creation. You should also have a look to see the basic principles of Java. Stack Overflow is a great place to get advice on specific problems but I am afraid that they do not like broader problems such as the one you present here.
From your question I assume you are asking how to "spawn" in the Ender Dragon rather than "add it". For this you will need to place this snippet in a method linked to an event handler:
EntityDragon dragon = new EntityDragon(worldIn);
worldIn.spawnEntity(dragon);
where worldIn is the world argument from the method.
However, I suggest that you watch more tutorials on YT to get the basics, then have a look at other peoples' mod code on Github.
(Quark is a great example of some simple modding mechanics, so I suggest you trawl its source code -> https://github.com/Vazkii/Quark/tree/master/src/main/java/vazkii/quark)

Common Lisp; Paradigms of AI Programming examples not working

I got Paradigms of Artificial Intelligence Programming because I've read tons of good reviews about it, but every example have errors, I tried using SBCL and Lispworks on windows 7.
For example, I'm trying to write a scheme interpreter, this file has undefined functions, this file has undefined operators, and this file, there's something wrong with REQUIRE.
Google didn't help, it seems that I'm the only guy having these errors. The book is really amazing but I'm dying to see a working code. would you please copy/paste and see if it works for you? Is it only me who has these kind of errors?
Should i try a Clisp or something? Should i contact the author asking him to correct his code? but he is a director at google now, he won't reply to a stupid guy like me, therefore i'm coming here for help, you can't find lisp experts everywhere
Your problem is that you are treating each file as a stand-alone system. They are not independent, but build on each other.
You need to follow the instructions in the README file you link to instead of loading the individual files.

Changes to PostgreSQL source code

I was working around with Postgres a bit. I am trying to get familiar to editing the source code of the same.
One of the suggested exercise was to change the buffer replacement policy of the system of Postgres 7.4. (It was in one of the homeworks of some university. First few links of google. I am just using them to get familiar to the code.)
I understand parts of it but I am not able to fully understand how to modify the system. I mean, I know the particular files,buffer folder files in the src/backend/storage location as the files where I have to make changes, but how to implement my own scheme and test it, is going over my head.
So my question is, can anyone help me with some basic code snippet understanding? (Probably, give me idea how to solve the question mentioned above? and how to test it ( most important). ) (This is not a homework of any sort, promise. I am just trying to get a hang of things.)
If not, can anyone refer me to some book which can help me with modification of the postgresql source code? There are books to use postgresql, but I couldn't find any that could help to modify the source code.
P.S: I know the online documentation of PGSQL source code resides at: http://doxygen.postgresql.org/
But I am not able to understand a lot from there. I need a book that can help the layman!
Any help is much appreciated!
Apart from the Developer FAQ your best starting point will be the PostgreSQL mailing lists.
You might start with posting to http://archives.postgresql.org/pgsql-novice/ ("No question is too simple for this list")
And if you really start changing the source code you will need to subscribe to http://archives.postgresql.org/pgsql-hackers/ as well.
And don't use the 7.x source code. PostgreSQL is at Version 9.1 now and I'm sure studying the ancient history won't be very helpful.

Getting Started with an IDE?

Having programmed through emacs and vi for years and years at this point, I have heard that using an IDE is a very good way of becoming more efficient.
To that end, I have decided to try using Eclipse for a lot of coding and seeing how I get on.
Are there any suggestions for easing the transition over to an IDE. Obviously, some will think none of this is worth the bother, but I think with Eclipse allowing emacs-style key bindings and having code completion and in-built debugging, I reckon it is well worth trying to move over to a more feature-rich environment for the bulk of my development worth.
So what suggestions do you have for easing the transition?
Eclipse is the best IDE I've used, even considering its quite large footprint and sluggishness on slow computers (like my work machine... Pentium III!).
Rather than trying to 'ease the transition', I think it's better to jump right in and let yourself be overwhelmed by the bells and whistles and truly useful refactorings etc.
Here are some of the most useful things I would consciously use as soon as possible:
ctrl-shift-t finds and opens a class via incremental search on the name
ctrl-shift-o automatically generates import statements (and deletes redundant ones)
F3 on an identifier to jump to its definition, and alt-left/right like in web browsers to go back/forward in navigation history
The "Quick fix" tool, which has a large amount of context-sensitive refactorings and such. Some examples:
String messageXml = in.read();
Message response = messageParser.parse(messageXml);
return response;
If you put the text cursor on the argument to parse(...) and press ctrl+1, Eclipse will suggest "Inline local variable". If you do that, then repeat with the cursor over the return variable 'response', the end result will be:
return messageParser.parse(in.read());
There are many, many little rules like this which the quick fix tool will suggest and apply to help refactor your code (including the exact opposite, "extract to local variable/field/constant", which can be invaluable).
You can write code that calls a method you haven't written yet - going to the line which now displays an error and using quick fix will offer to create a method matching the parameters inferred from your usage. Similarly so for variables.
All these small refactorings and shortcuts save a lot of time and are much more quickly picked up than you'd expect. Whenever you're about to rearrange code, experiment with quick fix to see if it suggests something useful.
There's also a nice bag of tricks directly available in the menus, like generating getters/setters, extracting interfaces and the like. Jump in and try everything out!
One thing that helped me transition from Emacs to other IDEs was the idea that IDEs are terrible editors. I scoffed at that person but I now see their point.
An editor, like Emacs or Vim, can really focus on being a good editor first and foremost.
An IDE, like Visual Studio or Eclipse, really focuses on being a good project management tool with a built in way to modify files.
I find that keeping the above in mind (and keeping Emacs handy) helps me to not get frustrated when the IDE du jour is not meeting my needs.
If you've been using emacs/vi for years (although you listed both, so it seems like you may not be adapted fully to one of them), using said editor will probably be faster for you than an IDE. The level of mind-meld a competant emacs/vi user can achieve with a customized setup and years of muscle memory is astounding.
Some free ones:
XCode on the Mac
Eclipse
Lazarus (Open Source clone of Delphi)
Visual Studio Express
Editions
Try making a couple of test applications just to get your feet wet. At first, it will probably feel more cumbersome. The benefits of IDEs don't come until you begin having a good understanding of them and their various capabilities. Once you know where everything is and start to understand the key commands, life gets easier, MUCH easier.
I think you'll find IDE's invaluable once you get into them. The code complete and navigation features, integrated running/debugging, and all the other little benefits really add up.
Some suggestions for starting out and easing transition:
- start by going through a tutorial or demonstration included with the IDE documentation to get familar with where things are in the GUI.
- look at different kinds of sample projects (usually included with the IDE or as a separate download) for different types of areas you may be coding (web applications, desktop applications, etc) to see how they are laid out and structured in the IDE.
- once comfortable, create your own project from existing code that you know well, ideally not something overly complex, and get it all compiling/working.
- explore the power! Debug your code, use refactorings, etc. The right click menu is your friend until you learn the keyboard shortcuts just to see all the things you can do. Right click different areas of your code to see what is possible and learn (or re-map) the keyboard shortcuts.
Read the doc...
And see what shortcuts/keybindings equivalents are with your familiar ones. Learn the new ones...
Old question, but let me suggest that in some circumstances, something like Notepad++ might be appropriate for the OP's situation which may be encountered by others. Especially if you are looking for something lightweight, Notepad++ can be part of a developer's arsenal of tools. Eclipse, Visual Studio and others are resource hogs with all their automagic going on and if you are looking to whip out something pretty quick with a whole bunch of keyboard shortcuts and the like or if you are interested in viewing someone else's source, this can be quite useful. Oh yeah, and it is free too.