adambard / learnxinyminutes-docs

Code documentation written as code! How novel and totally my idea!
https://learnxinyminutes.com/
Other
11.19k stars 3.24k forks source link

[Request] Computer Science topics outside of programming #526

Open gizmo385 opened 10 years ago

gizmo385 commented 10 years ago

I think the addition of pages on things related to programming and computer science, but not purely programming would be helpful. For example, a page covering sorting algorithms and their differences or a page on basic algorithm analysis.

Thoughts?

levibostian commented 10 years ago

Being that the focus of this project is to provide programmers with a reference to pick up a language quickly, I personally do not believe in having documentation on how to program. Learning about a specific algorithm is a pretty cool idea, but again, maybe not right for this project's focus.

I could see algorithm documentation working pretty well in this project, but it is large enough of a project to start from scratch.

JakeHP commented 10 years ago

Well to be fair @levibostian, every language we have has enough information to probably have it's own project. "Take a whirlwind tour of your next favorite language." By definition learnxinyminutes is about presenting a lot of information quickly (as a reference/quick guide for experienced people). It's purpose is not to cover everything about x. If that was the case we would just have a collection of links to language api sites...http://docs.oracle.com/javase/7/docs/api/ , http://static.rust-lang.org/doc/master/index.html, etc. Which is why I think it'd be a good idea to add algorithmic concepts and practices; we don't need to cover everything.

@gizmo385 I think it's a great idea to have an algorithms section. I would contribute if I manage to find some free time.

levibostian commented 10 years ago

@Jakehp Thank you for your comment. I do agree with your comment, I am just not sure what coverage this project is aiming towards with different types of content (quality vs quantity). It would be up to @adambard but because a tools section is expanding on the site with a frameworks section in the talks, I am sure this section could be added as well.

What I love about this project is how it is full of examples on how to use a language and is such a good reference for experienced programmers. APIs are for people who already know how to use the language and they need to look up some specific function or class but we show you how to use that function or class so the APIs are actually helpful. So instead of people reading about CS concepts on Wikipedia which requires a more advanced level of knowledge, we present the content with examples and explanation like the rest of our material does.

JakeHP commented 10 years ago

@gizmo385 How does this all sound as a base line...

gizmo385 commented 10 years ago

@Jakehp I think that sounds pretty good. Maybe add a section on searching as well after sorting?

mp19uy commented 9 years ago

There is a wiki with a big ammount of algorithms written in many languages: http://rosettacode.org/wiki/Category:Programming_Tasks Just my 2 cents.

JakeHP commented 9 years ago

@levibostian @adambard I started this today. I am thinking we should create a new section/category for "Algorithms & Data Structures". What do you think?

levibostian commented 9 years ago

@Jakehp you have my vote!

JakeHP commented 9 years ago

https://github.com/adambard/learnxinyminutes-docs/pull/950

gizmo385 commented 9 years ago

Definite (albeit late) +1 on the contribution by @Jakehp. Is there any way we'd be able to use MathJax or something similar to parse LaTeX? Once the explanations start delving deeper into some of the more complicated math related to algorithms and data structures, certain things like sums are going to become commonplace and we'll need a way to effectively express those to the users. Thoughts?

JakeHP commented 9 years ago

@gizmo385 That's a really good idea; although I'll have to learn LaTeX. @adambard is this possible?

levibostian commented 9 years ago

I've experienced MathJax.js in the past and I really liked it. Just a simple js file you stick in the head and anywhere in your HTML you enclose Latex.

Here is a fully working example:

<!DOCTYPE html>
<html>
<head>
<title>MathJax TeX Test Page</title>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>
<script type="text/javascript"
  src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</head>
<body>
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
</body>
</html>

So really, we could do that pretty easy.

geoffliu commented 9 years ago

Well, using $ $ is a bit dangerous, especially for the Perl page, no?

I would much prefer to have <latex> tags for these, and looks like the config like lets you specify any delimiter?

iirelu commented 9 years ago

@levibostian Could I recommend KaTeX instead of MathJax? It's leagues faster and can also be rendered server-side.

gizmo385 commented 9 years ago

I've heard similar things about KaTeX @iirelu. Would we be able to take advantage of the server side rendering so that we'd only ever have to generate the corresponding render for any given LaTeX formula once?

As for the tags @geoffliu, it looks as though you can customize the inline math tags. I haven't worked with MathJax (or KaTeX) before, but I would assume that we would be able to come up with a suitable tag that we'd be able to use.

Menelion commented 9 years ago

My two cents :). It would be really good if any maths notation you select would be accessible to everyone, and namely to the blind and visually impaired people. @iirelu, any thoughts, please? :)

iirelu commented 9 years ago

@Oire What do you mean by accessibility? It doesn't look to me like MathJax has any accessibility improvements over KaTeX.

Menelion commented 9 years ago

@iirelu, what would you get after rendering KaTeX? As for MathJax, latest versions of screen reading solutions (namely, JAWS 16) seem to support (at least basic) MathML rendered by MathJax. Am I totally mistaken and out of subject here?)
P.S. Sorry if it is not your strong point, but I saw a neat little thing making Braille from images in your profile, so I thought you might be more informed than most people :).

iirelu commented 9 years ago

@Oire Server-side rendering just renders HTML, so the browser displays the exact same thing as if KaTeX was running locally except it works even with javascript disabled. If you're wondering what the actual rendering looks like, check the website.

JakeHP commented 9 years ago

Guess I'll wait on writing next articles until we settle this?

iirelu commented 9 years ago

@Jakehp No, go ahead, things can be fixed later if need be.

adambard commented 9 years ago

Totally, go nuts. I'm probably most likely to find a way to render latex when there's a pressing need to render latex :)

ghost commented 8 years ago

Data structures and algorithms are a sweet addition, but how about slightly more niche topics? For example, if someone were to present as a learnxinyminutes page an overview of compilers, operating system principles, game engines, or software design patterns?

mhmood-sf commented 3 years ago

I really love the addition of these new topics! But, I think the category name of "Algorithms & Data Structures" doesn't fit these topics very much. Maybe something like "Theory"? The topics focus more on CS theory, rather than just algorithms & data structures.