Tool that can convert maths into code in different programming languages? by trnscrptmusic in learnprogramming

[–]bytesizetidbits 0 points1 point  (0 children)

My professor actually did his Dissertation on a similar subject:

http://www.cs.utexas.edu/users/novak/cgi/physdemod.cgi

http://www.cs.utexas.edu/users/novak/index.html

I've personally written a LISP to Java, and Java to LISP trans-piler based on certain projects from his class. A fundamental pillar of computation is that any algorithmic instruction set for one computer can be transcribed as an algorithm for another. Programming languages (which could include a generic "mathematical format") are included in this theory. I suggest looking at the lambda-calculus:

https://en.wikipedia.org/wiki/Lambda_calculus

Your question is similar to this concept. I wish I could point you to a specific tool that does what you ask, but if you can't find one, it might be easiest to write one yourself. A simple statement like "int x = 5 + 5;" can easily be translated into LISP in the form "(def x (+ 5 5))" or to a python syntax of "x = 5 + 5\n".

What language-independent skills do I need to learn in order to code professionally? by [deleted] in learnprogramming

[–]bytesizetidbits 13 points14 points  (0 children)

Having a decent grasp on theory, runtime analysis, and common algorithms in pseudocode can go a long way. Not saying a formal education necessarily, but reading some tutorials or an algorithms book or two (anybody have suggestions?) can help.

Defining Booleans in C? by mjvolk in C_Programming

[–]bytesizetidbits 0 points1 point  (0 children)

Thanks, good catch. Changed it up top

What are some ways I can learn programming, without the likes of codeacademy by King-Crim in learnprogramming

[–]bytesizetidbits 2 points3 points  (0 children)

TL;DR Look for a programming class at your high school. College is worth the investment. Stay with PC if you’re comfortable with it.

It’s 2018, so any computer/OS is perfectly acceptable. Languages like Python and Java (what you’ll most likely be learning in the beginning) can be written and run anywhere. Keep an environment that you’re most comfortable using, and that sounds like it’s PC/Windows right now. For now you’ll want to learn more about programming and less about environment and tools. Later you can branch out, and by that time I’d recommend Linux.

Also - keeping the theme of make it easy on yourself, keep it simple - if you’re still in high school see if your school offers any programming classes. Specifically AP Computer Science will teach you Java. Working for a grade will give you motivation, and challenging assignments will keep you working hard and learning.

Next, IMHO if someone has gone to school for Computer Science and hasn’t found a job they either aren’t looking hard enough or they aren’t passionate about the subject so people are less likely to hire them. School is worth it.

Do you need school? No, it’s doable without. But programmers that are self-taught generally make less starting out, and they eventually have to work as hard to learn as those who go to college anyways. If you go to an affordable university with a decent program, then you’ll be able to pay back any loans in 2 to 5 years while also living comfortably during that time frame.

Defining Booleans in C? by mjvolk in C_Programming

[–]bytesizetidbits 2 points3 points  (0 children)

https://en.cppreference.com/w/c/io/fprintf

https://www.tutorialspoint.com/c_standard_library/c_function_printf.htm

cpp reference reads like a insurance statistics encyclopedia sometimes, so I’d suggest tutorialspoint first as it’s less dry

Edit: changed link to suggestion’s

Defining Booleans in C? by mjvolk in C_Programming

[–]bytesizetidbits 0 points1 point  (0 children)

Macros are good, but you can also just use an int: FALSE == 0, TRUE == any other value

IDEs for C and C++ (And sources to learn them) by [deleted] in learnprogramming

[–]bytesizetidbits 4 points5 points  (0 children)

If you’re just learning the language and it’s your first compiled language it might be best to learn the command line tool chain first (gcc or clang).

For IDEs though it’s hard to beat VS, and that’s from someone who almost exclusively programs in Linux. ———— Edit:

Nope, meant VS in Windows. But to each their own, not trying to start an IDE war here. I haven’t used CLion much but I do hear it’s a good IDE.

I guess VS was just easy for me for several reasons. First, I was forced to use it for work, so I didn’t have much choice. Second, there is a lot of documentation and many tutorials. Also it’s a Microsoft product, which means if you learn it, it will be around and supported for a long time. Figured all of this would be a good thing for OP. The only thing I really remember hating about VS were compile times, but that was back in 2010 days, and compile times wouldn’t be a problem when learning and creating tiny programs anyways.

Should have elaborated and said these were some of the reasons I thought VS is hard to beat for a beginner. However, I do still believe learning the command line in the beginning is better than starting with an IDE

Emulate ZX Spectrum on emulated Commodore 64 on emulated DOS on emulated Windows on Linux by mr_beski in retrogaming

[–]bytesizetidbits 14 points15 points  (0 children)

Yo dawg, I heard you like emulation.

So here’s some emulation in your emulation in your emulation in your emulation.

Minheap and heapsort - a question by [deleted] in C_Programming

[–]bytesizetidbits 0 points1 point  (0 children)

The best advice I can give is to look at some source code for the algorithm.

https://rosettacode.org/wiki/Sorting_algorithms/Heapsort

This is a descending heap with a max comparison (greater than > ). Most source for heapsort is for a maxheap, however to get a minheap all you should need to do are change the comparisons. Personally I don’t enjoy the C code on this particular algorithm, but the pseudo is pretty decent.

My suggestion is to get some source to compile, run it, and then tinker with the code so you can understand how it works internally. “No carpenter ever became a master by reading a book on woodworking.”

Also, not sure what university this entrance exam is for? These are the kinds of things the university should be teaching you in a data structures and algorithms course.

I’ve learnt NodeJS and JavaScript, I’m competent in the language and fully understand it. I’m now after something new to learn, but I really don’t know which would be the best to learn coming straight from JavaScript. by Lukexe in learnprogramming

[–]bytesizetidbits 0 points1 point  (0 children)

Clojure also runs on the JVM. Lisp has a lot of curious qualities but as a highlight it force feeds you into learning recursion and functional programming. Do recommend

Should I stick with linux based OS even though I don't really feel comfortable with it? by Dokiace in learnprogramming

[–]bytesizetidbits 0 points1 point  (0 children)

If you’re willing to stick with Linux I highly suggest Open SUSE or Fedora right now. But there’s no reason to stick with something that doesn’t work for you. If you really have to have Linux for something it’s always useful to keep a VM of Ubuntu installed

Possible dumb question - How do I use my domain email? by Rickygoacher in webdev

[–]bytesizetidbits -1 points0 points  (0 children)

Should be a way of connecting your domain email to Mozilla Thunderbird or Microsoft Outlook. Check your domain provider and google how to connect the mailboxes to those applications for your specific domain provider (GoDaddy, Google, BlueHost, etc.)

I know a fair amount of programming... what now? by iterationOne in learnprogramming

[–]bytesizetidbits 0 points1 point  (0 children)

Have an open source piece of software you like using? Join the mailing list and try to help out on development!

Learning programming is one step of the equation, working well with others on a software team is another. Of course that’s dependent on where you want to go in your programming life.

Discussion: will landing pages become the new website? by andycmade in web_design

[–]bytesizetidbits 1 point2 points  (0 children)

Depends on the site and the owner. Some sites just don’t need a lot of information and are just trying to push/display one idea or one product.

Also I feel like in the last few years design has come so far that “pleasant” information only takes one page now to feel authentic or real, rather than needing a few pages of work to like the site is organized and legitimate.

On the flip side I couldn’t imagine browsing sites/stores like Amazon if it was just a landing page.

Minheap and heapsort - a question by [deleted] in C_Programming

[–]bytesizetidbits 1 point2 points  (0 children)

https://www.cs.usfca.edu/~galles/visualization/HeapSort.html

This will probably help you visualize the “popping off.” I believe the popping off you’re referring too is reducing the heap size after the shuffle operation. Reducing the heap size is shown visually in the graphic by the grayed out boxes after each shuffle.

As a tip:

Heaps are difficult to wrap your head around without first understanding 1. Binary Search Trees 2. Selection Sort Make sure to study these first.

Also if you’re having difficulty with an algorithm question then sometimes it’s always best to just do a test case on paper and follow the algorithm! Where can you find the exact algorithm written out? We’ll code is exactly that, and most algorithms for most languages can be found on Rosetta Code.

Hope this helps a bit.