I'm trying to say a program (as in something a programmer/程序员） finally works! Is there a way to translate this "works" into chinese?
Could I say 我的代码终于可以了！？ Or is there a way that is more clear what I mean?
我的代码终于可以了 is close to
My code is ok now, you can say something more clearly like
运行 工作 跑（起来）
我的代码终于可以运行了！ it's usual way to say so
We say 跑起来了(informal).
这破程序我改了半天,终于能跑起来了！ [I worked and worked and worked on that 'piece of code', finally it worked.]
终于跑了！should be a good one. (Literally means finally - it is - running) In this case, 跑 means a program IS RUNNING, but not ESCAPING.
Like people already suggested, its good to say:
“跑” as in the sense of "to run" (the program) is a calque from English to Chinese. It's very literal and very easy to understand. Just like "sky craping tower" is loaned and translated literally as “摩天楼” （rub－sky－building）and very much make sense.