Information Technology

MVC- What is Model?

Learn Programming - Thu, 01/17/2019 - 22:51

Programming in java. Learning to use multiple classes to make my code more "clean". Someone recommended me MVC; I love it. I think I'm having trouble understanding what model means. Please correct me if I'm wrong.

Let's say we have 3 buttons on a panel.

Model would define it like, new JButton startButton = JButton(); But obviously define panel to but the button on and a window to add the panel to.

View would display the button on the panel on the window.

Controller would let the user press the button to go from the start menu to the next screen, and so the cycle continues.

submitted by /u/Zillakazi
[link] [comments]

[any] how to deal with guard clause obviating the need for an else?

Learn Programming - Thu, 01/17/2019 - 22:43

I'm a big fan of exit guards. That is, something like this at the beginning of a function:

if (in != a) and (in != b) { return; } ...

However, I then often encounter a pattern like this, later on in the function:

if (in == a) { some stuff } else if (in == b) { other stuff }

Now, although I haven't quite drunk the kool-aid that every if should have an else, I do think that every else if should have an else. Except— I can't think of anything appropriate to put in an else except for die "ur processor is broken". How can I restructure my code to avoid this difficulty?

submitted by /u/Elronnd
[link] [comments]

16 year old beginner looking for advice on what to learn and what resources to use.

Learn Programming - Thu, 01/17/2019 - 22:32

16 years old, recently got very interested in programming. I've watched some YouTube guides and practiced writing HTML and python so far. I really want to grind hard for 100+ hours in my free time and hone this skill, and possibly pursue computer science in university. What kind of study plan would you advise for someone in my position? I'd love to hear about useful websites or videos.


submitted by /u/saudiarabian14
[link] [comments]

Akai Force is for DJs and producers that want to ditch the laptop

Engadget - Thu, 01/17/2019 - 22:32
Akai made its name around the early 90s thanks to its line of relatively affordable S-series samplers and the (now legendary) MPC. Since then, the company has continued to release new spins on those mainstays, the latest of which is the all-in-one Fo...

Confusion regarding relationship between bash on Windows and Windows Subsystem for Linux

Learn Programming - Thu, 01/17/2019 - 22:15

I have WSL active on my Windows PC. What I'm curious about the basics of how the subsystem is installed on the OS. When I activate WSL, is a version of Ubuntu installed in Windows? Furthermore, what's the difference between going in the Windows terminal and typing "bash" to run a bash terminal vs. running the application called "Bash on Ubuntu on Windows"? I'm sorry if this seems a bit basic to ask, but WSL is a bit confusing for me. Also, if I install a terminal app like Hyper, and I change the preferences of the terminal to use bash by default, its simply using the WSL Ubuntu install to accomplish this, correct?

submitted by /u/sammito1
[link] [comments]

Anything with minimal bezels, less than 15” screen for general use for $1,300 or less?

I was checking out the Lenovo Yogabook 730 but I can’t get over the massive bezel on the bottom.

I liked the ASUS Zenbook UX391 but the $1,100 model is an awful red color.

I liked the ASUS Zenbook 13 but I’m but I’m worried the i5 processor won’t hold up in the future.

I don’t mind the MacBook Air but I’d prefer Windows, and the processor again worries me.

Anything else that I should look into? Personally I’m leaning towards the Zenbook 13. Do you all think the i5 processor will be okay with general use and light gaming (emulators and maybe older games like PSO, Diablo 2, and FFXI)? Reviews also mention the keyboard is a little weird, as anyone used it?

Thanks for any input or recommendations.

submitted by /u/mcarrode
[link] [comments]

I just finished my first project ever: DnD Dice!

Learn Programming - Thu, 01/17/2019 - 22:01


So I have been learning to code for about 3-4 weeks now, and I finally finished my first ever project! So I transferred into CS this semester (hence my only been coding for 3-4 weeks) and I left my DnD dice at home over break..

So, I decided to write a program in python that lets me roll d20, d20+d6, d20+d6(*2) or d20+d6+d8!

It's actually been really useful and I'm kinda proud of myself. I never thought I could do something like this haha.

submitted by /u/warriors7796
[link] [comments]

Designing A Toilet Roll Holder

Hack a Day - Thu, 01/17/2019 - 22:00

Everything needs to be designed, at one point or another. There are jobs for those who design kitchens, and stadiums, and interplanetary spacecraft. However, there are also jobs for those who design cutlery, hose fittings, and even toilet roll holders. [Eric Strebel] is here to share just such a story.

[Eric] covers the whole process from start to finish. In the beginning, a wide variety of concepts are drawn up and explored on paper. Various ideas are evaluated against each other and whittled down to a small handful. Then, cardboard models are created and the concepts further refined. This continues through several further phases until it gets down to the fun part of choosing colours and materials for the final product.

Watching the effects of cost and manufacturing process shape the finished item is instructive as to how the design process works in the real world. The toilet paper holder itself is an interesting unit, too – using adjustable magnetic detents to enable one-handed use, as well as including a cell phone holder.

We’ve seen [Eric]’s work before – such as his primer on the value of cardboard in design. Video after the break.



At what point should I move on from html/css?

Learn Programming - Thu, 01/17/2019 - 21:57

I've been dipping into html/css the last few days and kind of want to go further afield so I can work on projects which are actually interesting to me.

I kinda hate following tutorials on sites like freecodecamp because the information never sticks with me if I'm bored, so I've just been learning on the fly whilst making a basic website and I've really enjoyed figuring out problems for myself(with googles help). I'm not sure if I've progressed enough to move on from these languages to something like Javascript and wondering if I should just bite the bullet and try to tough out freecodecamp until I've completed all the criteria?

Also, I haven't decided whether I'm going to want to go down the front-end/back-end route, is Java a decent language to sit on until I've decided?

Thanks :)

submitted by /u/Stevieyeet
[link] [comments]

What is 0X supposed to really mean in front of hexadecimal numbers? Can someone tell me if I have this answer right?

Learn Programming - Thu, 01/17/2019 - 21:57

Which is the most significant digit in the hexadecimal number 0x8b2da150?

I got 8, because I remember my teacher saying that 0x really doesn't matter that much but I didn't understand why it doesn't matter and why we don't have to count it.

submitted by /u/juravenator99
[link] [comments]

Old bugs, new bugs, red bugs … yes, it's Oracle mega-update day again

The Register - Thu, 01/17/2019 - 21:56
Out of 284 flaws, 33 are rated critical. Big Red admins have big patches ahead

Oracle admins, here's your first critical patch advisory for 2019, and it's a doozy: a total of 284 vulnerabilities patched across Big Red's product range, and 33 of them are rated “critical”.…


3D printing news - Thu, 01/17/2019 - 21:50

This is thanks to all the helpful people in this subreddit. A friend bought an ender 3 pro and had issues with I went over helped him get the bootloader installed and get the new Merlin firmware installed after we still had issues so brought it home to work on. Even though I have never asked a question by reading here I have been able to overcome all the problems and have been happily printing away (including a print in place hinged phone stand). Sadly it goes home this weekend and I will miss the sound of it happily printing away in the other room. Thanks again for all the help.

submitted by /u/vividdemise
[link] [comments]

Add and drag text boxes in browser

Learn Programming - Thu, 01/17/2019 - 21:49

Hi all. I'd like to build something like this: clicking in the browser will create an editable, resizable, draggable textbox at that coordinate. Whatever is entered will be saved. What would be the best approach to build something like this?

submitted by /u/Shami_V
[link] [comments]

Made a chrome extension in couple days!

Learn Programming - Thu, 01/17/2019 - 21:40

Hey guys, this is actually the first time I've ever experienced coding in JS, HTML, CSS, etc. Decided to make a cool little extension as a small side project. Its basically an audible tab manager to quickly manage those pesky audible tabs that always seem to be hidden away. Check it out!

Let me know if anyone is interested in the resources and information I used while developing the extension. The chrome API is actually really cool and I highly recommend other fellow programmers to start off making simple chrome extensions as it helps give a good introduction to programming! Best thing about it is you can produce pretty cool things in such a short amount of time.

submitted by /u/mestagonis
[link] [comments]

Question for the Programmers of Reddit

Learn Programming - Thu, 01/17/2019 - 21:36

Hello computer literate people!

This is my first post on this sub, so please excuse any errors. I know absolutely NOTHING about programming.

I am the Operations Director of a small non-profit that is branching out our scope of business. I am interested in developing an online platform (system?) that can is for internal use only as sort of a filing system. Think patient filing system type thing. I do not want to use one of the many already built ones out there, I would like to either learn to do it, or hire a programmer to build it specifically for our company. I just need help understanding exactly what I am asking for if I shall go to a professional. I hope I am making sense here. What would such a thing be called? Our company has a website, of course. But I am looking for an online management system to kind of organize all of our documents for each "patient."

submitted by /u/missstrugglebus
[link] [comments]

$500 Laptop for gaming, classwork and netflix

  • Total budget and country of purchase: $500, USA
  • Do you prefer a 2 in 1 form factor, good battery life or best specifications for the money? Pick or include any that apply. I'd like best specs and battery life
  • How important is weight and thinness to you? Preferrably light, but I'm okay with anything
  • Which OS do you require? Windows, Mac, Chrome OS, Linux. Windows 10 preferred
  • Do you have a preferred screen size? If indifferent, put N/A. 15.6", please
  • Are you doing any CAD/video editing/photo editing/gaming? List which programs/games you desire to run. Yes, I will be playing lower-end games, and using telegram to voice chat while I play
  • If you're gaming, do you have certain games you want to play? At what settings and FPS do you want? I'm looking for something to play Minecraft, Terraria, Starbound, TF2, CS;GO, and especially games such as GTA IV and possibly GTA V
  • Any specific requirements such as good keyboard, reliable build quality, touch-screen, finger-print reader, optical drive or good input devices (keyboard/touchpad)? I'd like a sturdy build (possibly made of metal but not needed), bluetooth would be nice but again isn't needed
  • Leave any finishing thoughts here that you may feel are necessary and beneficial to the discussion. Just like a few months ago, this is a test to see if there's any better laptops around now, thanks!
submitted by /u/Davidthenormie
[link] [comments]

Creating an algorithm from a flowchart

Learn Programming - Thu, 01/17/2019 - 21:32

Hi, I'm completely new to programming/coding. What I'm trying to do is create a PDF or other web page or document that will populate certain sections of information based on the answers in a flowchart of scenarios. I am trying to create personalized documents for participants in a program, but I'm unsure how to take it from the flowchart stage and determining the limitations and end points of the chains of logic to something that actually will populate a PDF or other document. Any suggestions either on how to do it or what sort of information I should be searching for? I don't really know the correct terms for anything so I haven't really had much luck in my research.

submitted by /u/lispenardstreet
[link] [comments]