As a junior developer, how to stand up to yourself and your coding decisions? Ask Programming |
- As a junior developer, how to stand up to yourself and your coding decisions?
- How to make a load balancer that allows hidden services to know what client sent what?
- [algorithms] is there a good source for test suites for basic data structures and algorithms?
- Question on exception handling conventions
- How to program a radio broadcast web service?
- Can I use index.hbs instead of index.html
- C++ Visual Studio: I have a header file, a function definition file and a test file where I call the functions. However I only have the option to 'attach to process' at the moment and not run the test file. How do I link the three files so that the test file 'sees' the other two files? (more)
- Hi guys, i ne ed help
- I want to make a writing application that sets limitations and challenges [Python]
- LAN Messenger
- C++ Public/Private question.
- Question about certain Objects in OOP
- Are there "systematic" ways of simplifying complicated conditional constructs in a program into some "normal" forms?
- A youtube channel for learning web development the simple way
- (Google) Maps with scheduled location markers
- Is there an objective way to assess my relative output speed?
- Python alternative and looping
- Decimal Fraction to Any base conversion, Python
As a junior developer, how to stand up to yourself and your coding decisions? Posted: 12 Sep 2020 02:44 AM PDT We got a new hire who is more experienced than most of the people in the office. He is talking shit about our code that we wrote with a previously given scope in mind (we had absolutely no idea of those new features that are requested now), taking tasks that I am working on and finishing them quicker than me, making me waste sometimes entire days that way. He is also proposing all sorts of architectural changes to the already written code and since he is more experienced that me, I think I should listen but I also see him being too hasty about everything, often causing architectural mismatch with our other apps (and lots of bugs that now sometimes pop up and wasn't there before) and I am taking the blame for it, because I approved those decisions he made. Honestly I feel like I somehow need to stand up to myself now, but since this is my first programming job and I am still relatively new, I don't know how to turn down some of the changes that he is proposing... My point is that the code we already have works and redoing large chunks of it might cause more trouble than it's worth (down the line we might discover that something else breaks, causing a huge headache), despite the changes he is proposing might be better in the long run... Maybe. Seriously I am more stressed now than I was before his "help" and am already looking for a new job. In summary, i guess I have 2 questions:
Btw I am always open to new ideas and suggestions, but not when someone straight up starts talking down on my code without knowing the context. [link] [comments] |
How to make a load balancer that allows hidden services to know what client sent what? Posted: 12 Sep 2020 05:09 PM PDT Hey guys, Im using java to create a load balancer so my clients can communicate with multiple servers through a single exposed socket. I do not have the option of something like rabbitmq or something, and I need to make the load balancer myself. The problem I am having is that my servers need identification of the client that sent a message/request to function correctly, yet when I reroute messages through my load balancer it makes it seem like it is coming from a single source. I have written this in java, and essentially the flow of the program is;
Doing this means I use a new socket on the load balancer, which means I send information about the load balancer instead of the client. Is there any way around this? I also am unable to change the message type to send client information in the message itself. [link] [comments] |
[algorithms] is there a good source for test suites for basic data structures and algorithms? Posted: 12 Sep 2020 08:10 PM PDT For example, if I'm practicing implementing sorting algorithms, is there somewhere I can download a test suite of just a bunch of different arrays my algorithm could be tested on? Covering things like edge cases, unique arrays (already sorted, lots of dupes, etc.). Kind of like what leetcode uses to check your code. I love how leetcode does all that kind of stuff for me, but I'm trying to move to practicing in my own environment in prep for interviews. In my case, looking for java. Or just some strings that can be parsed. [link] [comments] |
Question on exception handling conventions Posted: 12 Sep 2020 12:14 PM PDT So I have a function within a red black tree that searches for a value using a key passed to it as an argument. If the function can't find the value, it throws an exception. One subroutine that calls the function assumes the tree doesn't hold the value and another assumes it does hold the value. Since the first subroutine assumes the function doesn't hold the value, an exception will be thrown almost every time. Would it be wrong to code the main portion of the first subroutine within a catch block? I'm using C++ if that's of any use. [link] [comments] |
How to program a radio broadcast web service? Posted: 12 Sep 2020 04:25 PM PDT Hey folks! First question before I start this: Is there a more fitting sub, where I can ask about how I should structure/build my project than this? If so, please tell me :) Ok. So I'm not really new to programming, but I never built a web app from scratch and this is where I'd like to hear some recommendations or best practices. I do have a quite full idea of what I want to code, I just want opinions, if I didn't see obvious mistakes for me. So here's the idea: I want to build a "web radio" app. This means for listeners there should be an audio stream they can listen via e.g. VLC player (or any other software for that). This radio should get its songs from local sound files and then pick songs randomly; play the next song if one ends and so forth. Just a self-running radio. Ofc I have many more features in thought, but I guess this would be a good start to have a functioning automatic audio stream. Then I'd like to have a web player for it (self-coded, there's not the best player already available) and an admin backend, which simply is a web app with which I can control my radio stream. Like start/stop, adding/removing songs (file upload which will then import the file into the local file system) and so on. So in my thoughts, this would be a perfect example for backend + frontend. I also want to have information stored in a database, so I guess mariaDB or Postgres come to my mind - please recommend other posibilities if you think there would be a better choice! That's the basic idea. As I want it to be open source and self-hosted, I guess it's the best to have it dockered. Now some questions, where I need help:
So I guess I explained what I'd like to make and where my problems right now are. So if you have any thoughts to it, please don't hesitate to share! Also if you need any information, I gladly answer your questions. And at last, if you have any special resource/tutorial for a project like this in mind, I'd also gladly take it :) [link] [comments] |
Can I use index.hbs instead of index.html Posted: 12 Sep 2020 07:46 AM PDT I am doing a login system, I would like to ask whether I can upload the file of index.hbs instead of index.html in the file of the web hosting. I am doing the login system using node.js, mysql and hbs [link] [comments] |
Posted: 12 Sep 2020 01:13 PM PDT I know the issue is related to having zero projects open in the solution explorer, but I have had some trouble understanding how the project -> header file -> test file system works i.e. I dont know when visual studio will give me the 'system cannot find the file specified' error. I have looked on stack and havent seen an answer that solved the issue. Apologies about the basic question Im working from home and dont have anyone around to ask, so small things like this take me a long time to fix! EDIT: I think part of the issue arises when I 'create a solution' in the solution explorer window. It gives me the option to save in the folder 'repos' but I would just like to save it to my google drive stream. Can I do this or does it have to be saved in the repos location to work? [link] [comments] |
Posted: 12 Sep 2020 01:08 PM PDT Hi, can you please tel me why i dont se the image with this code: <img src="https://images.app.goo.gl/yivCqERY1DLrVcV56" width=150" height="70"> ? Thank you. [link] [comments] |
I want to make a writing application that sets limitations and challenges [Python] Posted: 12 Sep 2020 06:56 AM PDT So, I'm trying to learn Python and I've heard building projects is the best way to get better and learn. I know enough to do some of the algorithms in sites like CodeWars and HackerRank. I want to make a writing application in which you can set a time limit to write a certain amount of words and if you don't complete it within the allotted time your whole progress gets erased. If you complete it, you get the option to save the file into your PC. I've only worked in terminals, IDEs(Jupyter Notebook), online code editors and have never made anything with a GUI which is what I want to do. How would I go about doing this? [link] [comments] |
Posted: 12 Sep 2020 11:06 AM PDT I have basically no experience with programming, but I am trying to learn C#. Someday I plan to make a customised LAN Messenger for my home/office network, but I really have no clue where to start lmao. If anyone has ANY advice on what language would be easiest or has any tutorials/advice, it would be greatly appreciated. [link] [comments] |
Posted: 12 Sep 2020 10:53 AM PDT Question: /* Write the definition of a class Sphere containing: A data member radius of type double. A member function called setRadius that accepts a parameter and assigns it to radius. If the parameter is negative, the member function should reverse it to its positive value. The function returns no value. A member function called getRadius that accepts no parameters and returns the value of radius. A member function called getVolume that accepts no parameters and returns the volume of a sphere. A member function called getSurface that accepts no parameters and returns the surface of the sphere. Notes: Search online for the sphere volume and surface formulas. If you decide to use the fraction 4/3 in the sphere volume formula, make sure the division of 4 by 3 returns a double. Consider 3.14 as the value pi. */ My code: class Sphere{ }; This is giving me this error: https://i.imgur.com/2VE2CD7.png I'm rusty at c++ and can't see where my error is. I believe I may have made a mistake with the radius, but am not sure. Any help highly appreciated. [link] [comments] |
Question about certain Objects in OOP Posted: 12 Sep 2020 10:49 AM PDT So I have a question about certain objects in Object Oriented Programming. Is there a name for the type of object (such as the Student shown below) that stores data but doesn't actually have any functionality? I've been calling them helper objects because they help out the main flow of the program by organizing data. Is there an official name for them? Code example (Java): [link] [comments] |
Posted: 12 Sep 2020 10:03 AM PDT |
A youtube channel for learning web development the simple way Posted: 12 Sep 2020 05:22 AM PDT Here the link to my channel : https://www.youtube.com/channel/UCB8UAORbvqjOQkz86k1iDPA I plan to teach everything that's necessary to become a successful web developer i upload a few videos each week i started the channel only a few weeks ago so there isnt a tone of content But please check it out if your interested and thank in advanced if you do watch my videos [link] [comments] |
(Google) Maps with scheduled location markers Posted: 12 Sep 2020 03:20 AM PDT Hi all, I'm looking for a plugin/script or way to code a Map view of a city, where certain locations within the city are pinpointed/marked according to a schedule. Like: "mark location A every Tuesday between 7.00 - 8.00 pm", "mark location B and C every Wednesday and Thursday between 5.00 - 6.00 pm". Etc. I want it to link directly to Google Maps anyway, so the map itself doesn't have to be that comprehensive. Does anyone know a good way to approach this? Many thanks! [link] [comments] |
Is there an objective way to assess my relative output speed? Posted: 12 Sep 2020 02:57 AM PDT I'm studying for web dev, full stack JS. I know a fair bit after 2 years study but have a contemplative approach and feel my output on personal projects is slow. Is there anything out there that I can use as a baseline test? I'm thinking, some kind of projects that has an estimated time requirement would be good. Not completely object but good enough, thanks. [link] [comments] |
Python alternative and looping Posted: 11 Sep 2020 11:10 PM PDT Hi, I am a beginner in python programming. I want to know how to loop again to my code using a while or for loop. The scenario is the ordering system, the user can multiple inputs of order and will compute the quantity and total of it. [link] [comments] |
Decimal Fraction to Any base conversion, Python Posted: 12 Sep 2020 12:39 AM PDT I need help with converting a fraction decimal such as 12.50 to binary or any base I choose. I tried using the .split method to no succession, please help :(( using .split method and for loop works for base r to decimal but making it base r is creating errors. if you use A, you can convert any base with fractions to decimal successfully. However in B It counts everything as a whole number import string import math def main(): #Ascii Characters Ascii={0: '0', 1: '1', 2: '2', 3: '3', 4: '4', 5: '5', 6: '6', 7: '7', 8: '8', 9: '9', 10: 'A', 11: 'B', 12: 'C', 13: 'D', 14: 'E', 15: 'F', 16: 'G'} #Header and Main Menu title="NUMBER BASE CONVERSION PROGRAM" TITLE=title.center(70,"*") print(TITLE,"\n") print('NOTE: Letters in Ascii characters must be Capitalized!!!\n') print("\n A. BASE R TO BASE 10") print(" B. BASE 10 TO BASE R") print(" C. QUIT THE PROGRAM \n") #Choices choice=input("Enter your choice:") if choice== 'A' or choice== 'a': A(Ascii) if choice== 'B' or choice== 'b': B(Ascii) if choice== 'C' or choice== 'c': quit(choice) def A(Ascii): #Inputs N= input("Num: ") Baseinput=int(input("From Base:")) Basetoconvertto=10 print("Base" ,Baseinput,":",N.upper()) #Formula DN=0 if N.find('.') == -1: for i in range(len(N)): for value in Ascii: if Ascii[value]== N.upper()[::-1][i]: DN+= value * (Baseinput ** i) print("Decimal:",DN) else: split=N.split('.') for j in range(len(split)): for i in range(len(split[j])): for value in Ascii: if j == 0: if Ascii[value]== split[j].upper()[::-1][i]: DN+= value * (Baseinput ** i) elif j == 1: if Ascii[value]== split[j].upper()[::-1][i]: DN+= value * (Baseinput ** ( i - (len(split[j])))) print("Decimal:",DN) ask=input(" Do you want to try again? (yes or no): ") if ask== 'yes' or ask== 'YES' or ask== 'Yes': main() if ask== 'no' or ask== 'NO' or ask== 'No': print("Thank You, GoodBye!") quit(Choice) def B(Ascii): N=input("Num:") BASE=10 Basetoconvertto=int(input("Convert To Base:")) print("Base" ,BASE,":",N) #From Base B1 to Decimal DN=0 for i in range(len(N)): for fv in Ascii: if Ascii[fv]== N[::-1][i]: # FaceValue of the Digit DN+= fv * (BASE ** i) print("Decimal:",DN) #From Decimal to Base B2 if N.find('.') == -1: if N == '0': BN = 0 else: BN = "" while DN > 0: BN += Ascii[DN % Basetoconvertto] # Digit for the Value DN = int(DN / Basetoconvertto) print("Base[",Basetoconvertto,"]:",BN[::-1]) else: split=N.split('.') for j in range(len(split)): if N == '0': BN = 0 else: BN = "" while int(split[j]) > 0: BN += Ascii[int(split[j]) % Basetoconvertto] # Digit for the Value split[j] = int(int(split[j]) / Basetoconvertto) print("Base[",Basetoconvertto,"]:",BN[::-1]) ask=input(" Do you want to try again? (yes or no): ") if ask== 'yes' or ask== 'YES' or ask== 'Yes': main() if ask== 'no' or ask== 'NO' or ask== 'No': print("Thank You, GoodBye!") quit(Choice) def quit(choice): exit() main() [link] [comments] |
You are subscribed to email updates from AskProgramming. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment