일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- CPU
- floating point
- Sector
- ack
- interrupt
- physical address
- 명령어
- 코드 컴플릿
- refactoring
- 리펙토링
- float
- private ip
- osi 7
- ALU
- Public IP
- MMU
- 클린 코드
- 사설 IP
- network
- register
- 공인 IP
- cache
- Code complete
- L3 Router
- 가독성
- L2 switch
- Clean code
- addressing mode
- page
- TCP
- Today
- Total
목록refactoring (21)
Software Lab

def forward(): print('move forward') def left(): print('move left') def right(): print('move right') def backward(): print('move backward') def move(key): if(key == 'w'): forward() elif(key == 'a'): left() elif(key == 'd'): right() elif(key == 's'): backward() def forward(): print('move forward') def left(): print('move left') def right(): print('move right') def backward(): print('move backward..

public String getFruit(){ int random = RandomInt(); int i = random % 4; switch(i){ case 0: return "Grape"; case 1: return "Apple"; case 2: return "Orange"; case 3: return "Banana"; } } public String getFruit(){ String fruits[] = {"Grape", "Apple", "Orange", "Banana"}; int random = RandomInt(); int i = random % fruits.getLength(); return fruits[i]; } 비교문에서 코드 패턴이 일정하다면 Collection을 활용하여 코드를 개선할 수 ..

class Line{ int startX, startY; int endX, endY; public Line(int startX, int startY, int endX, int endY){ this.startX = startX; this.startY = startY; this.endX = endX; this.endY = endY; } public void draw(){ .... .... } } class Point{ int x; int y; public Point(int x, int y){ this.x = x; this.y = y; } } class Line{ Point start; Poinrt end; public Line(Point start, Point end){ this.start = start; ..

class Circle{ double radius; double area; public Circle(double radius){ this.raduis = radius; this.area = radius * radius * 3.14; } public void getArea(){ return this.area; } public void setRadius(double radius){ this.radius = radius; this.area = radius * radius * 3.14; } } class Circle{ double radius; public Circle(double radius){ this.radius = radius; } public double getArea(){ return this.rad..

public Authentication getAuthentication(HttpServletRequest request) { String token = request.getHeader("Authorization"); if (token != null) { JWTVerifier verifier = JwtTokenUtil.getVerifier(); DecodedJWT decodedJWT = verifier.verify(token); String userID = decodedJWT.getSubject(); if (userID != null) { UserProfile userProfile = UserProfileProvider.getByUserID(userID); if(userProfile != null) { A..