The Furry Forums
Furry Chat => Tech Central => Topic started by: Erasmuth on June 30, 2015, 04:48:50 PM
-
Hello! I don't know about you guys but I love to code. Sometimes I'll just grab a prompt from reddit and work on it in the same way an artist works on a commission. Anyone else like that here, or am I just weird? XD
To get things rolling I'll ask a few questions then answer them first:
What got you into programming?
What is your favorite language(s) to use?
Any projects you're working on that you can share?
I got into programming originally because of my Magic: The Gathering collection. I got tired of sifting through piles of cards just to see if I had one that I was looking for, so I decided I'd make a digital database of cards that I could just search. Making it as a BASH script in the terminal was easy, things got a bit out of hand when I wanted to add a GUI though. <.< Still working on that bit.
My main language right now is RUBY, but I'm also learning python kinda easily. I like the way it's interpreter throws a fit if you don't indent properly, reinforces good habits. I can also do some stuff with HTML, CSS, and a bit of PHP, but I don't use them often enough to say I'm proficient with them.
Right now I'm trying to make something for a reddit prompt. Someone posted a challenge for a program that turns any number into a palindrome. I got that bit down. Right now the issue is if you feed it 99 (Or any other palindrome), you get 44044 (Or whatever palindrome comes next in line) instead of the If statement at the end catching it and saying it's already a palindrome. If someone spots my issue there, feel free to reply. For now though, it's still a WIP, feel free to copy and play with it if you want. ^^
#This method is used to take a number and add it to it's mirror image.
def iterate(num)
result = num.to_i + num.to_s.reverse.to_i
return result
end
#This method uses the iterate method repeatedly until a palindrome is found
def pal(num)
qw = iterate(num)
finish = false
count = 0
while finish!= true
if qw == qw.to_s.reverse.to_i
finish = true
count += 1
else
puts "#{qw}"
qw = iterate(qw)
count += 1
sleep(0.1)
end
end
end
#Gets input from the user
puts "Please input number to palindromize"
num = gets.chomp
#SHOULD run the palindrome program unless num is already a palindrome, working on it
if num != num.to_s.reverse.to_i
pal(num)
puts "After #{count} iterations, the palindrome of #{num} is #{qw}"
else
puts "Already a palindrome, silly!"
end
-
What got you into programming?
Quite a few years back, RuneScape private servers. It's where I was introduced to Java, and from there, everything went downhill. I've picked up like 4 other languages since then.
What is your favorite language(s) to use?
Current favorite is golang, also use Python and JavaScript a lot. Many of my projects use PHP because of simplicity and ease of deployment for others. Rarely use Java anymore.
Any projects you're working on that you can share?
Just recently I wrote bindings in golang (https://github.com/Syfaro/telegram-bot-api) for the Telegram Bot API, and I'm working on a proper bot framework (https://github.com/Syfaro/tgbot) for it too. There's quite a few other projects I've worked on on my GitHub page, and countless numbers that have never made it that far.
-
Wow, as a novice that project kinda goes over my head a bit x3
I can see the logic behind it thanks to those lovely comments though.
I'll try my paws at golang though, does it have an intended programming type? or is it more general use?
Sorry if my noobishness is annoying x3
-
I can see the logic behind it thanks to those lovely comments though.
Golint complains at me if I don't comment every single exposed function!
I'll try my paws at golang though, does it have an intended programming type? or is it more general use?
I think it's mostly for servers, the same code runs everywhere and everything is packed into a single binary instead of being dependent on system libraries. There's some bindings for Qt and the like, but I've never found those too fun to work with. But I don't really like making stuff user friendly :p
It's so easy to cross compile code, I can build a binary on any computer that'll run on every other type of computer.
Sorry if my noobishness is annoying x3
Everyone has to start somewhere!
-
I don't really like making stuff user friendly :p
Gotta keep that job security x3
-
Gotta keep that job security x3
A lot of the things I make aren't terribly useful for people who aren't comfortable with reading source code to figure out how to configure them, and even then most of those things aren't really usable for people other than me, so it's not terribly important :p
-
Syfaro, intended to share or not, documentation is always a must.
-
What got me into programming?
It started with server management mainly, which is ironic cause most of my programming these days does not have anything to do with servers or web-based clients.
What are your favourite language(s)?
I don't have a favourite language, but the ones I know best are C, C#, Java and Perl. I also am competent in Python, Haskell and few others things, like LUA, CGI, BASH, PhP and stuff.
What projects are you working on atm?
I'm currently working on two things, one for work and one for fun.
Work: I currently work at the Garvan Institute of Medical Research, I'm in a team of three that are developing a visualization tool for a simulation of metastasis in bones. It works in blender and runs in python, not my first choice of utilities but what can you do. It's really cool though, currently I'm developing a UI for our program, not as easy as it sounds because blender has no UI support and we're trying not to import a UI library into it. So basically I have to design the UI like buttons, text boxes, pop-up boxes, etc, from scratch in a program environment that doesn't seem to want to have a UI x.x
Fun: Currently leading a team in developing... wait for it... a video game! It's a game designed for PC Windows, it's a little bit hard to explain so I'll give a brief detail. It's made in unity and runs on C#. The game basically follows a scientist who seeks to find meaning in life by developing a machine that will unlock the truth, you play a particle in the Quantum world that is guided to develop components of the machine. The game is heavily based on actual concepts of quantum mechanics and the puzzles usually require these concepts like Quantum Entanglement, Quantum Tunneling, Pauli exclusion principle and the Uncertainty Principle in order to solve these puzzles (though you don't need to know these before hand of course!) It's really great fun developing and is slowly becoming quite a nice game if I do say so myself!
-
blender has no UI support
TIL
I know Lua. I got into it, due to modding. I'm looking into learning C++, but I can't motivate myself.
My brother also creates mods and scripts, but for Hedgewars (2D Worms clone) and I think it also uses Lua, but I'm not sure.
-
Learn C, once you know C it's easy to learn a lot of other languages like C++, C#, Java, Python, Perl, etc.
This lecturer has some great vids: https://www.youtube.com/watch?v=hE7l6Adoiiw&list=PLEEAD1D187A7CCD6C (https://www.youtube.com/watch?v=hE7l6Adoiiw&list=PLEEAD1D187A7CCD6C)
-
Something else I find is helping me out is going to htt://projecteuler.net/ (http://www.thefurryforum.com/forums/htt://projecteuler.net/)
This website proposes several mathematical challenges, I've been writing programs to solve them one at a time to help stimulate logical thinking ^^